[Plugin] [REL] MySQL Plugin (Now on github!)

Pain123, can you slow down with the development, and add in some real and useful natives, and fix most bugs instead of speeding up development.. You already came off to R31 on the plugins, I don't know how, but still.. you have to give time for other coders to cope up with the new functions you've added/deleted. It's really hard, concerning you're rapidly changing things without proper notification
Reply

@Sublime: The R33 is comming out pretty slow, it has a new useful "system", ORM-like natives. It also has speed improvements and fixes (AFAIK). It's really easy to cope up with the new changes, I change them really fast.
Reply

Quote:
Originally Posted by Sublime
Посмотреть сообщение
Pain123, can you slow down with the development, and add in some real and useful natives, and fix most bugs instead of speeding up development.. You already came off to R31 on the plugins, I don't know how, but still.. you have to give time for other coders to cope up with the new functions you've added/deleted. It's really hard, concerning you're rapidly changing things without proper notification
I thought R31 is almost bug-free. If you still encountered a bug, report it.
Don't worry, I'm taking my time with R33. Just for the lulz, here is the current changelog for R33:
Quote:
Originally Posted by changelog
R33
- added ORM system
- improved Windows XP compatibility (proven to work now)
- added parameter values to debug native log messages
- improved y_inline compatiblity code
- "orm_select" and "orm_insert" support y_inline (use "orm_select_inline" and "orm_insert_inline")
- added Cache-tags to cache_set_active, cache_save and cache_delete
- added natives "cache_get_row_count" and "cache_get_field_count"
- added more safety checks
- speed improvements, R33 is the fastest revision released yet
- fixed bug where mysql_free_result wasn't called internally if callback processing was skipped
- improved thread safety
- added native "mysql_set_thread_count" to manually determine the thread count
- changed the way the multi-threading system initializes (lazy-init now)
Reply

@IstuntmanI, Why speak of R33 when R32 is not out? And thanks for the info, ORM? Pretty cool!
Reply

Quote:
Originally Posted by Pain123
Посмотреть сообщение
Are you using the correct libmysql.dll (if on Windows)? Is the MySQL server online?
I am. Is there any way to verify that it is online? I mean it should be.
Reply

@Sublime: R32 is available at the ****** Code Source, but it's only a hotfix to the code, so R33 is the next Release.

@Pain123:
Quote:

- added natives "cache_get_row_count" and "cache_get_field_count"
- added native "mysql_set_thread_count" to manually determine the thread count

Awesome !

What means
Quote:

- changed the way the multi-threading system initializes (lazy-init now)

? It means that it will init with like 2 threads, so your cores won't be checked ?
Reply

If you can access any table with a tool like phpMyAdmin or Navicat it should be online. What OS (Win XP/7?) and MySQL server version (5.1, 5.5?) are you using?

EDIT:
Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
What means

? It means that it will init with like 2 threads, so your cores won't be checked ?
It won't init with any threads. It will init if it needs to be initialized. The cores are checked at initialization, unless you use the new thread_count native.
It basically means that R33 will also run on your sh**ty PC.
Reply

Quote:
Originally Posted by Pain123
Посмотреть сообщение
It basically means that R33 will also run on your sh**ty PC.
I love you.
Reply

So.. if I can run it on a Win 98 OS, how much RAM will it expect to take?
Reply

Quote:
Originally Posted by Sublime
Посмотреть сообщение
So.. if I can run it on a Win 98 OS, how much RAM will it expect to take?
I don't really believe that it will work on 98. I also believe that it shouldn't take much RAM, as long as you don't send every 2 seconds queries to fetch huge results.
Reply

Quote:
Originally Posted by Vince
Посмотреть сообщение
Код:
[16:50:46] [WARNING] CMySQLHandle::Create - connection already exists
Not sure how to get rid of that. Or even whether it is a bug or not. I'm connecting to the same server, with the same credentials, from a filterscript and a gamemode at the same time.
Use callremotefunction to send the MySQL connection ID to other files so that you don't have to be connecting over and over.
Reply

Quote:
Originally Posted by BigGroter
Посмотреть сообщение
I am. Is there any way to verify that it is online? I mean it should be.
Anyone?
Reply

Quote:
Originally Posted by BigGroter
Посмотреть сообщение
I am. Is there any way to verify that it is online? I mean it should be.
Yes:
pawn Код:
if( mysql_errno( connectionHandle ) != 0 )
{
    print( "Not connected !" );
}
Put that code right after mysql_connect.
Reply

Nothing is printed.
edit:
Same with this, nothing printed:
pawn Код:
if(mysql_errno(dbHandle) != 0)
    {
                printf("\n\nERROR: MySQL has failed to establish a connection with %s.", MYSQLIP);

                mysql_close(dbHandle);
                mysql_connect(MYSQLIP, MYSQLUSER, MYSQLDB, MYSQLPASSWORD);

                if(mysql_errno(dbHandle) == 0) printf("\n\nDEBUG: MySQL has successfuly established a connection with %s.\n\n", MYSQLIP);
                else
                {
                        printf("\n\nERROR: MySQL has failed to establish a connection with %s.\n\n", MYSQLIP);
                        print("-- FATAL ERROR SERVER HALTED --");
                        return 0;
                }
    }
Reply

Um.. why not just use

mysql_connect(SQLHOST, SQLUSER, SQLPASS, SQLDB);

and define them. I think it won't work, but still try. If not, try using a external free MySQL database providing website like db4free.net
Reply

Quote:
Originally Posted by Kar
Посмотреть сообщение
Use callremotefunction to send the MySQL connection ID to other files so that you don't have to be connecting over and over.
Then I'd much rather use a second user to connect. Provided that this also doesn't return the same connection id ... If two scripts have the same MySQL callback, how does the plugin know where to return to?
Reply

Quote:
Originally Posted by Sublime
Посмотреть сообщение
Um.. why not just use

mysql_connect(SQLHOST, SQLUSER, SQLPASS, SQLDB);

and define them. I think it won't work, but still try. If not, try using a external free MySQL database providing website like db4free.net
I already have this?
Reply

Just saying to change defines, and use external DB host.
Reply

He's using a database at Volt, but it can't be an issue with them not allowing external connections because he also tried running the SA:MP server on the Volt server.

Obviously there's some issue with the SQL connection; but I don't know what and I'm not sure how to solve this. It COULD be an issue that Volt has to fix, but that's probably not likely because they have had this node for awhile now and I'm fairly certain a lot of their clients are on it.
Reply

Quote:
Originally Posted by BigGroter
Посмотреть сообщение
Anyone?
I did answered you:
Quote:
Originally Posted by Pain123
Посмотреть сообщение
If you can access any table with a tool like phpMyAdmin or Navicat it should be online. What OS (Win XP/7?) and MySQL server version (5.1, 5.5?) are you using?
Quote:
Originally Posted by Vince
Посмотреть сообщение
Then I'd much rather use a second user to connect. Provided that this also doesn't return the same connection id ... If two scripts have the same MySQL callback, how does the plugin know where to return to?
No, it won't return the same connection id.
The plugin calls every callback with that name. I already saw that problem and fixed it in R33, the plugin now only calls the first callback it finds and then stops.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)