SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 08/09/2016, 05:12 AM   #5941
MerryDeer
Banned
 
Join Date: Jun 2016
Posts: 723
Reputation: 8
Default Re: [REL] MySQL Plugin (Now on github!)

Yes there is somewhere mistake, because i too get server crash on querie, just mysql querie like you, it means this function have mistake.
MerryDeer is offline   Reply With Quote
Old 08/09/2016, 06:23 AM   #5942
maddinat0r
Banned
 
Join Date: Jun 2010
Location: Germany
Posts: 845
Reputation: 482
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by TommyB View Post
I'm experiencing a crash whenever I run a specific query.

Code:
mysql_format(conn, mquery, sizeof(mquery), "SELECT VehicleModel FROM vehicles WHERE NeedsRecovery = 1 AND OwnerSQLID = %i", SQLID[playerid]);
mysql_pquery(conn, mquery, "MyCarsRecovery", "iis", playerid, Vcount, gstr);
I get the following error from crashdetect.

Code:
[21:14:18] [debug] Server crashed while executing RCRP_MySQL.amx
[21:14:18] [debug] AMX backtrace:
[21:14:18] [debug] #0 native mysql_pquery () from mysql.DLL
[21:14:18] [debug] #1 001d09c4 in public cmd_mycars (playerid=1, ... <1 argument>) at C:\Users\TommyB\Desktop\servers\redcountyrp\gamemodes\RCRP_MySQL.pwn:32719
[21:14:18] [debug] #2 native CallLocalFunction () from samp-server.exe
[21:14:18] [debug] #3 00009588 in public OnPlayerCommandText (playerid=1, cmdtext[]=@02b8eeec "/mycars") at C:\Users\TommyB\Desktop\servers\redcountyrp\pawno\include\zcmd.inc:78
[21:14:18] [debug] Native backtrace:
[21:14:18] [debug] #0 6435658a in ?? () from plugins\mysql.DLL
[21:14:18] [debug] #1 64357ec8 in ?? () from plugins\mysql.DLL
[21:14:18] [debug] #2 64371aec in ?? () from plugins\mysql.DLL
[21:14:18] [debug] #3 6437655e in ?? () from plugins\mysql.DLL
[21:14:18] [debug] #4 004010b6 in ?? () from samp-server.exe
[21:14:18] [debug] #5 64c862ca in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #6 64c88b28 in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #7 64c809c7 in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #8 64c8631a in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #9 64294509 in ?? () from plugins\streamer.DLL
[21:14:18] [debug] #10 004746be in ?? () from samp-server.exe
[21:14:18] [debug] #11 004010b6 in ?? () from samp-server.exe
[21:14:18] [debug] #12 64c862ca in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #13 64c88b28 in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #14 64c809c7 in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #15 64c8631a in ?? () from plugins\crashdetect.DLL
[21:14:18] [debug] #16 64294509 in ?? () from plugins\streamer.DLL
[21:14:18] [debug] #17 0046dd10 in ?? () from samp-server.exe
[21:14:18] [debug] #18 00452270 in ?? () from samp-server.exe
[21:14:18] [debug] #19 0049eef9 in ?? () from samp-server.exe
[21:14:18] [debug] #20 004aa31e in ?? () from samp-server.exe
This also prints into log-core.log
Code:
[21:14:18] [ERROR] exception 0XC0000005 (ACCESS_VIOLATION) from Vectored Exception Handler catched; shutting log-core down
Quote:
Originally Posted by MerryDeer View Post
Yes there is somewhere mistake, because i too get server crash on querie, just mysql querie like you, it means this function have mistake.
I need a mysql.log with debug output, otherwise I can't narrow down the crash. So please enable full logging ("mysql_log(ALL);"), reproduce that crash and send me the mysql.log per PM.
maddinat0r is offline   Reply With Quote
Old 08/09/2016, 07:08 AM   #5943
MerryDeer
Banned
 
Join Date: Jun 2016
Posts: 723
Reputation: 8
Default Re: [REL] MySQL Plugin (Now on github!)

What difference between

cache_num_rows

and

cache_get_row_count ?
MerryDeer is offline   Reply With Quote
Old 08/09/2016, 08:14 AM   #5944
Stinged
High-roller
 
Join Date: Feb 2013
Posts: 1,571
Reputation: 187
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by MerryDeer View Post
What difference between

cache_num_rows

and

cache_get_row_count ?
pawn Code:
// from a_mysql.inc
stock cache_num_rows()
{
    new row_count;
    cache_get_row_count(row_count);
    return row_count;
}

It returns the row count instead of having to store it in a variable.
Stinged is offline   Reply With Quote
Old 09/09/2016, 12:37 PM   #5945
oMa37
Gangsta
 
Join Date: Feb 2016
Posts: 933
Reputation: 156
Default Re: [REL] MySQL Plugin (Now on github!)

Code:
[08:32:41]  Loading plugin: mysql.so
[08:32:41]   Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory)
How may i fix this issue on Centos 7 ?
oMa37 is offline   Reply With Quote
Old 09/09/2016, 08:47 PM   #5946
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 318
Reputation: 37
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
[23:39:59] [debug] Server crashed while executing Mod.amx
[23:39:59] [debug] AMX backtrace:
[23:39:59] [debug] #0 native cache_get_value_name () from mysql.DLL
[23:39:59] [debug] #1 006e0c5c in public LoadGangs () at Mod.pwn:57755
[23:39:59] [debug] Native backtrace:
[23:39:59] [debug] #0 77d2ddf7 in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll
[23:39:59] [debug] #1 77d0136f in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll
[23:39:59] [debug] #2 6cca49a5 in ?? () from C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll
[23:39:59] [debug] #3 6bdb9fab in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #4 6bdb9b2e in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #5 6bdba71f in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #6 6bdb9c7a in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #7 6bdb39f7 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #8 6bdbf6d5 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #9 6bdcfbd0 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #10 6bdd3541 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #11 004010b6 in ?? () from samp-server.exe
[23:39:59] [debug] #12 6cb6c6fa in ?? () from plugins\crashdetect.DLL
[23:39:59] [debug] #13 6cb72278 in ?? () from plugins\crashdetect.DLL
[23:39:59] [debug] #14 6cb6a0d7 in ?? () from plugins\crashdetect.DLL
[23:39:59] [debug] #15 6cb6c74a in ?? () from plugins\crashdetect.DLL
[23:39:59] [debug] #16 6bd64509 in ?? () from plugins\streamer.DLL
[23:39:59] [debug] #17 6bdb8682 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #18 6bdd0f83 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #19 6bdd1ffc in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #20 6bdbcc61 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #21 6bdbce53 in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #22 6bdbe7fe in ?? () from plugins\mysql.DLL
[23:39:59] [debug] #23 00469a66 in ?? () from samp-server.exe
[23:39:59] [debug] #24 0048d4db in ?? () from samp-server.exe
[23:39:59] [debug] #25 0049b4a1 in ?? () from samp-server.exe
[23:39:59] [debug] #26 0049b4b1 in ?? () from samp-server.exe
errors.log

Quote:
[23:39:55] [log-core] exception 0XE06D7363 (<unknown>) from Unhandled Exception Handler catched; shutting log-core down
Crash because this:

mysql_log(ERROR | WARNING);
Max_Andolini is offline   Reply With Quote
Old 09/09/2016, 11:32 PM   #5947
PrO.GameR
Gangsta
 
PrO.GameR's Avatar
 
Join Date: Oct 2012
Posts: 694
Reputation: 121
Default Re: [REL] MySQL Plugin (Now on github!)

Is there a query I can make that'd turn NULL to 0 so I wouldn't have to grab the data as string and strval it to avoid the warning it drops in my mysql log? Sadly I'm really annoyed by such warnings that floods the log.
__________________
Blueberry Prison Roleplay will be back soon!
Follow the forums for more information about opening day.

Forums
PrO.GameR is offline   Reply With Quote
Old 10/09/2016, 04:20 AM   #5948
Sgt.TheDarkness
Banned
 
Join Date: Jun 2012
Location: Moscow, Russia.
Posts: 252
Reputation: 50
Default Re: [REL] MySQL Plugin (Now on github!)

What a great way to break compatibility.....


Will be sticking to R39-6.
Sgt.TheDarkness is offline   Reply With Quote
Old 10/09/2016, 08:16 AM   #5949
oMa37
Gangsta
 
Join Date: Feb 2016
Posts: 933
Reputation: 156
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by oMa37 View Post
Code:
[08:32:41]  Loading plugin: mysql.so
[08:32:41]   Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory)
How may i fix this issue on Centos 7 ?
....
oMa37 is offline   Reply With Quote
Old 10/09/2016, 08:48 AM   #5950
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,831
Reputation: 1401
Default Re: [REL] MySQL Plugin (Now on github!)

@eco1999: http://forum.sa-mp.com/showthread.php?p=3765459

Quote:
Originally Posted by PrO.GameR View Post
Is there a query I can make that'd turn NULL to 0 so I wouldn't have to grab the data as string and strval it to avoid the warning it drops in my mysql log? Sadly I'm really annoyed by such warnings that floods the log.
pawn Code:
"SELECT ..., IFNULL(column, 0), ..."
If the value of the specified column is NULL will be returned as 0 or any other number you set it to.

You can also check in the script before retrieving its value if it is null with cache_is_value_null and set a default value. If it is not, then retrieving it with cache_is_value_int but I find the first method way better.

Quote:
Originally Posted by oMa37 View Post
Code:
[08:32:41]  Loading plugin: mysql.so
[08:32:41]   Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory)
How may i fix this issue on Centos 7 ?
https://github.com/pBlueG/SA-MP-MySQL#faq
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
****** Project: Glass int3s0 Everything and Nothing 99 26/02/2013 04:22 PM
MySQL Plugin R5 plugin problem dud Scripting Help 12 05/12/2011 06:28 PM
Strikens Mysql vs BlueG's Mysql plugin PrawkC Scripting Help 4 30/09/2011 10:30 AM
[help][plugin] Can't load mysql plugin mariomako Help Archive 8 16/07/2011 02:37 PM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 02:32 PM


All times are GMT. The time now is 03:22 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.