Hello! After omission of MySQL is disconnected from the server, and restores the connection is not re-encoding.
What solution ? |
"SELECT `password`, `password_salt`, UNIX_TIMESTAMP(`last_active`) FROM `players` WHERE `username` = '%e' LIMIT 1"
[12:10:16] [plugins/mysql] cache_get_value_name: field 'last_active' not found
/** * MySQL plugin @MYSQL_PLUGIN_VERSION@ */ |
int mysql_init_options( ) { static AMX_NATIVE Native = sampgdk::FindNative( "mysql_init_options" ); return sampgdk::InvokeNative( Native, "" ); } template < class Args > //not sure if the params parameter passing is correct bool mysql_set_option( int option_id, E_MYSQL_OPTION type, Args * params ) { static AMX_NATIVE Native = sampgdk::FindNative( "mysql_set_option" ); return !!sampgdk::InvokeNative( Native, "iir", option_id, ( int ) type, params ); } int mysql_connect( const char host[ ], const char user[ ], const char password[ ], const char database[ ], int option_id = 0 ) { static AMX_NATIVE Native = sampgdk::FindNative( "mysql_connect" ); return sampgdk::InvokeNative( Native, "ssssi", host, user, password, database, option_id ); }
mysql_log( ALL ); int lConnectOptions = mysql_init_options( ), lPort = 3306, lPoolSize = 4; bool lAutoReconnect = true; sampgdk::logprintf( "OGMI - 1" ); Plugins::MySQL::set_option( lConnectOptions, SERVER_PORT, &lPort ); Plugins::MySQL::set_option( lConnectOptions, AUTO_RECONNECT, &lAutoReconnect ); Plugins::MySQL::set_option( lConnectOptions, POOL_SIZE, &lPoolSize ); sampgdk::logprintf( "OGMI - 2 - Options ID %d", lConnectOptions ); mysql_connect( MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, lConnectOptions ); sampgdk::logprintf( "OGMI - 3" );
Originally Posted by server_log.txt
OGMI - 1
OGMI - 2 - Options ID 1 |
[debug] Server crashed due to an unknown error [debug] Native backtrace: [debug] #0 5108f48e in ?? () from log-core.dll [debug] #1 5108f607 in ?? () from log-core.dll [debug] #2 5108a975 in ?? () from log-core.dll [debug] #3 77bd7cd0 in ?? () from plugins\mysql.DLL [debug] #4 77beec64 in ?? () from plugins\mysql.DLL [debug] #5 77658a40 in ?? () from plugins\MYGAMEMODE.DLL [debug] #6 776586a8 in ?? () from plugins\MYGAMEMODE.DLL [debug] #7 776507d4 in ?? () from plugins\MYGAMEMODE.DLL [debug] #8 77703492 in ?? () from plugins\MYGAMEMODE.DLL [debug] #9 7773ff5b in ?? () from plugins\MYGAMEMODE.DLL [debug] #10 77834cdd in ?? () from plugins\MYGAMEMODE.DLL [debug] #11 77648cd3 in ?? () from plugins\MYGAMEMODE.DLL [debug] #12 7765784f in ?? () from plugins\MYGAMEMODE.DLL [debug] #13 7764ae43 in ?? () from plugins\MYGAMEMODE.DLL [debug] #14 0046f679 in ?? () from samp-server.exe [debug] #15 65646f6d in ?? () from samp-server.exe [debug] #16 5a472f73 in ?? () from samp-server.exe [debug] #17 61625f53 in ?? () from samp-server.exe [debug] #18 612e6573 in ?? () from samp-server.exe [debug] Registers: [debug] EAX: 00000000 EBX: 00000001 ECX: 00000001 EDX: 00000000 [debug] ESI: 029bae90 EDI: 00000001 EBP: 61625f53 ESP: 00515c0c [debug] EIP: 612e6573 EFLAGS: 00010246 [debug] Stack: [debug] ESP+00000000: 0000786d 00000000 00000000 00000000 [debug] ESP+00000020: 00000000 00000000 00000000 00000000 [debug] ESP+00000040: 00000000 00000000 00000000 00000000 [debug] ESP+00000060: 00000000 00000000 00000000 00000000 [debug] ESP+00000080: 00000000 00000000 00000000 00000000 [debug] ESP+000000a0: 00000000 00000000 00000000 00000000 [debug] ESP+000000c0: 00000000 00000000 00000000 00000000 [debug] ESP+000000e0: 00000000 00000000 00000000 00000000 [debug] ESP+00000100: 00000000 00000000 00000000 00000000 [debug] ESP+00000120: 00000065 00000000 00000000 00000000 [debug] ESP+00000140: 00000000 00000000 00000000 00000000 [debug] ESP+00000160: 00000006 00000002 00000001 023c1850 [debug] ESP+00000180: 00000000 00516020 00000000 00000000 [debug] ESP+000001a0: 00000000 ffffffff ffffffff 00000000 [debug] ESP+000001c0: ffffffff 00000000 00000000 00000000 [debug] ESP+000001e0: 00000000 00000000 00000fa0 ffffffff [debug] ESP+00000200: 00000fa0 ffffffff ffffffff 00000000 [debug] ESP+00000220: ffffffff 00000000 00000000 00000000 [debug] ESP+00000240: 00000000 00000000 00000fa0 ffffffff [debug] ESP+00000260: 00000fa0 ffffffff ffffffff 00000000 [debug] ESP+00000280: ffffffff 00000000 00000000 00000000 [debug] ESP+000002a0: 00000000 00000000 00000fa0 ffffffff [debug] ESP+000002c0: 00000fa0 ffffffff ffffffff 00000000 [debug] ESP+000002e0: ffffffff 00000000 00000000 00000000 [debug] ESP+00000300: 00000000 00000000 00000000 00000000 [debug] ESP+00000320: 00000000 00000000 00000000 ffffff88 [debug] ESP+00000340: 00610064 00640072 00540020 006d0069 [debug] ESP+00000360: 00000000 00000000 00000000 00000000 [debug] ESP+00000380: 00000000 00540047 00200042 00610044 [debug] ESP+000003a0: 006d0069 00000065 00000000 00000000 [debug] ESP+000003c0: 00000000 00030000 00050000 00000003 [debug] ESP+000003e0: 00000001 00000000 00000000 00000000 [debug] Loaded modules: [debug] 00400000 - 00519000 samp-server.exe [debug] 77240000 - 773c3000 ntdll.dll [debug] 75bb0000 - 75c90000 KERNEL32.DLL [debug] 76590000 - 76731000 KERNELBASE.dll [debug] 74680000 - 75a59000 SHELL32.dll [debug] 76c00000 - 76cbe000 msvcrt.dll [debug] 73fb0000 - 73fe6000 cfgmgr32.dll [debug] 75e30000 - 7639e000 windows.storage.dll [debug] 73d80000 - 73f91000 combase.dll [debug] 76f90000 - 77070000 ucrtbase.dll [debug] 75c90000 - 75d51000 RPCRT4.dll [debug] 73d00000 - 73d1e000 SspiCli.dll [debug] 73cf0000 - 73cfa000 CRYPTBASE.dll [debug] 742c0000 - 7431a000 bcryptPrimitives.dll [debug] 75a60000 - 75aa1000 sechost.dll [debug] 76740000 - 76785000 powrprof.dll [debug] 74240000 - 742b7000 advapi32.dll [debug] 76d20000 - 76d66000 shlwapi.dll [debug] 74520000 - 7454b000 GDI32.dll [debug] 77070000 - 771cb000 gdi32full.dll [debug] 763a0000 - 764ff000 USER32.dll [debug] 74660000 - 74675000 win32u.dll [debug] 75e20000 - 75e2d000 kernel.appcore.dll [debug] 74320000 - 743a8000 shcore.dll [debug] 76cc0000 - 76ccf000 profapi.dll [debug] 57ab0000 - 57ab8000 WSOCK32.dll [debug] 70ab0000 - 70ad4000 WINMM.dll [debug] 771d0000 - 77233000 WS2_32.dll [debug] 00670000 - 00693000 WINMMBASE.dll [debug] 75d60000 - 75d85000 IMM32.DLL [debug] 510a0000 - 510f0000 crashdetect.DLL [debug] 77ce0000 - 77d49000 MSVCP100.dll [debug] 77c20000 - 77cdf000 MSVCR100.dll [debug] 77bc0000 - 77c15000 mysql.DLL [debug] 77ae0000 - 77bbe000 libmariadb.dll [debug] 51080000 - 5109e000 log-core.dll [debug] 65100000 - 6516d000 MSVCP140.dll [debug] 650e0000 - 650f5000 VCRUNTIME140.dll [debug] 70070000 - 70082000 napinsp.dll [debug] 70050000 - 70066000 pnrpnsp.dll [debug] 70030000 - 70044000 NLAapi.dll [debug] 73b30000 - 73b7e000 mswsock.dll [debug] 6fba0000 - 6fc1d000 DNSAPI.dll [debug] 74220000 - 74227000 NSI.dll [debug] 73c00000 - 73c2f000 IPHLPAPI.DLL [debug] 73aa0000 - 73aac000 winrnr.dll [debug] 73010000 - 73021000 wshbth.dll [debug] 73b80000 - 73b88000 rasadhlp.dll [debug] 77a80000 - 77ad7000 streamer.DLL [debug] 10000000 - 1000d000 sscanf.DLL [debug] 77e00000 - 77e0d000 gvar.DLL [debug] 77630000 - 77a73000 MYGAMEMODE.DLL [debug] 73a80000 - 73a96000 sslsp105.dll [debug] 76e10000 - 76f8d000 CRYPT32.dll [debug] 75e10000 - 75e1e000 MSASN1.dll [debug] 70180000 - 701c9000 fwpuclnt.dll [debug] 71cd0000 - 71ceb000 bcrypt.dll
Originally Posted by logs\log-core.log
[ERROR] exception 0XC0000005 (ACCESS_VIOLATION) from Vectored Exception Handler catched; shutting log-core down
|
Originally Posted by logs\errors.log
[log-core] exception 0XC0000005 (ACCESS_VIOLATION) from Vectored Exception Handler catched; shutting log-core down
|
Originally Posted by logs\plugins\mysql.log
[INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[DEBUG] mysql_init_options() [INFO] Options instance with id '1' successfully created. [DEBUG] mysql_init_options: return value: '1' [DEBUG] mysql_set_option(134265809, 5439571) [DEBUG] mysql_set_option: return value: '1' [DEBUG] mysql_set_option(134265809, 5439571) [DEBUG] mysql_set_option: return value: '1' [DEBUG] mysql_set_option(134265809, 5439571) [DEBUG] mysql_set_option: return value: '1' |
samp-server.exe log-core.dll libmariadb.dll [..] /plugins/ mysql.dll MYGAMEMODE.dll
Originally Posted by server.cfg
plugins crashdetect mysql [..] MYGAMEMODE
|
Debug: module 'plugins/mysql' - name 'mysql_connect' - params_format 'ss*sd' - params '00825678' |
Debug: case 's': params_format: 's' - current param: '134248417' - amx '02C69BC0' // if you ask me, I don't think the 'current param' looks fine |
fmt_msg << '"' << amx_GetCppString(amx, current_param) << '"';
amx_GetString(&string[0], addr, 0, len + 1);
Debug: param '134248417' - addr '00000000' - len '0' |
amx_GetAddr(amx, param, &addr);
Regarding the callbacks: that AMX validation is there in case someone sends a threaded query, which takes very long to execute, from within a filterscript and unloads that filterscript while it's still executing. The AMX structure associated with that callback is now invalid, but it's still stored in the internal MySQL plugin callback structures to call the callback when that query finishes. To make sure the plugin doesn't use that invalid AMX instance, I keep a list of valid AMX instances passed by the AmxLoad/AmxUnload callbacks.
I won't add a function to manually add a AMX instance to that list, since this is more of a hack than a proper solution. I don't see a good solution to this problem here, I'm open for any suggestions though. |
As I said in the sampgdk thread, I'd really suggest you incorporate the plugin source into your project. You only have to copy all the source files minus some unnecessary ones (main.cpp, CCallback.*, CDispatcher.*, COrm.*, natives.*, sdk.hpp, version.hpp.in), (maybe) remove some include directives, add the Boost headers to your include path (no need to compile the whole Boost library!) and link with the MySQL C connector. If you want to use the log core, you'd have to link to it too (you can download the developer package of the log core on GitHub). You could then use the logging functionality in your gamemode for your systems too. Write me a PM if you get stuck somewhere or need more detailed instructions on specific things.
|
I've meant the Discord plugin when I wrote about updating "it".
And Jesus Christ you don't have to rewrite anything, use any version you're comfortable with. Nobody is forcing you to use the latest version. |
Lol, but if you want the newest toys, you gotta stay up to date.
Also, I ain't sure, but as far as I know/understood, R+40 has some crash fixes which R30 do not have (?) |
Very good plugins, it's a pity to have an complete query when we use orm update whereas we only update one property.
|
I am not sure what you're saying, what is the issue the plugin features a function to send rich queries?
|
[06:22:44] [debug] Server crashed due to an unknown error [06:22:44] [debug] Native backtrace: [06:22:44] [debug] #0 68d1f1d3 in ?? () from log-core.dll [06:22:44] [debug] #1 68d12214 in ?? () from log-core.dll [06:22:44] [debug] #2 68d12440 in ?? () from log-core.dll [06:22:44] [debug] #3 68d11c77 in ?? () from log-core.dll [06:22:44] [debug] #4 68d13d61 in ?? () from log-core.dll [06:22:44] [debug] #5 68d64532 in ?? () from plugins\mysql.DLL [06:22:44] [debug] #6 00469ab5 in ?? () from samp-server.exe [06:22:44] [debug] #7 65646f6d in ?? () from samp-server.exe [06:22:44] [debug] #8 414c2f73 in ?? () from samp-server.exe [06:22:44] [debug] #9 524e434d in ?? () from samp-server.exe [06:22:44] [debug] #10 786d612e in ?? () from samp-server.exe
Hello. I have a problem. We moved the mod to MySQL R41-2, but my hosting does not support CentOs7. Can you compile the plug-in under CentOS 6
|
if you update only one field, ORM will generate a query and update all your fields even if 90% doesn't change.
|
Any ideas? I am using latest version.
VPS: Centos 7 x64 Other plugins: SKY streamer sscanf Whirlpool Code:
*** Error in `./samp03svr': free(): corrupted unsorted chunks: 0x0e13ee78 *** ======= Backtrace: ========= /lib/libc.so.6(+0x753bd)[0xb74e13bd] /lib/libstdc++.so.6(_ZdlPv+0x1f)[0xb76d197f] /lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1b)[0xb7738edb] /lib/libstdc++.so.6(+0xaff20)[0xb7738f20] plugins/mysql.so(+0x34e7a)[0xb743ee7a] plugins/mysql.so(+0x43490)[0xb744d490] plugins/mysql.so(_ZNSt14_Function_base13_Base_managerISt5_BindIFSt7_Mem_fnIM6CQueryFvvEESt10shared_ptrIS3_EEEE10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation+0x120)[0xb7427900] plugins/mysql.so(+0x1e50d)[0xb742850d] plugins/mysql.so(ProcessTick+0x24)[0xb74517d4] ./samp03svr[0x80d1ce2] ./samp03svr[0x80aef6c] ./samp03svr[0x80aa13a] /lib/libc.so.6(__libc_start_main+0xf3)[0xb74859a3] ./samp03svr[0x804b4e1] |
*** Error in `./samp03svr': malloc(): memory corruption: 0xb75f6409 *** ======= Backtrace: ========= /lib/libc.so.6(+0x76a03)[0xb74b2a03]