View previous topic :: View next topic |
Author |
Message |
uezi
Joined: 06 Dec 2006 Posts: 6
|
Posted: Wed Dec 06, 2006 23:55 Post subject: MySQL plugin, invalid query crashes the server ? |
|
|
Executing an invalid query using the MySQL plugin crashes the nwn2 server.
This is also the cause of the crash when using the Get/SetPersistent... functions when the PWDATA table has not been created.
Happens in 1.04-1.06 |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Thu Dec 07, 2006 14:30 Post subject: |
|
|
Hi
could you give us the query because with wrong query my server don't crash. |
|
Back to top |
|
|
uezi
Joined: 06 Dec 2006 Posts: 6
|
Posted: Thu Dec 07, 2006 23:33 Post subject: |
|
|
amphiprion wrote: | Hi
could you give us the query because with wrong query my server don't crash. |
SQLExecDirect( "SELECT sqlite_version(*)" );
You may wonder why this query on MySQL? Well it was an initial trick for detecting if SQLLite or MySQL was beeing used and activate code paths for supporting both databases
Well, now I changed my code and use the nwnx_include.nss functions for checking plugin information.
After this change the server no longer crashes. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Dec 07, 2006 23:40 Post subject: |
|
|
mysql probably viewed that as a stored proc, so it's possible that a call to a nonexistent stored proc would cause the crash? _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Dec 08, 2006 22:56 Post subject: |
|
|
Hmm, the only thing that happens here is:
Quote: | ! Error (mysql_query): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*)' at line 1.
|
Are you sure the mysql plugin is the most recent one ? You might want to try to replace everything with the files from the download again, just to make sure. _________________ Papillon |
|
Back to top |
|
|
uezi
Joined: 06 Dec 2006 Posts: 6
|
Posted: Sun Dec 10, 2006 11:11 Post subject: |
|
|
Papillon wrote: | Hmm, the only thing that happens here is:
Quote: | ! Error (mysql_query): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*)' at line 1.
|
Are you sure the mysql plugin is the most recent one ? You might want to try to replace everything with the files from the download again, just to make sure. |
mmh, I'll have to check it out again.
I should have been using the most recent plugin, but maybe I messed up something when merging the config files and updating to the newest version.
Anyways now I use the nwnx_include functions for checking the database type and the crash no longer occurs. |
|
Back to top |
|
|
|