SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 14/08/2017, 06:35 PM   #6111
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 875
Reputation: 437
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by Maceo7 View Post
if you update only one field, ORM will generate a query and update all your fields even if 90% doesn't change.
I could implement that, however this would require me to cache all values of the registered PAWN variables and always check if the value changed before generating the query. This likely has a bigger performance-impact than generating a longer query.

Quote:
Originally Posted by Freedom. View Post
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]
Can you reproduce this? If yes, enable debug logging, reproduce that crash and post the log file.
maddinat0r is offline   Reply With Quote
Old 17/08/2017, 09:22 PM   #6112
JasonRiggs
Huge Clucker
 
Join Date: Jul 2016
Location: My bedroom.
Posts: 475
Reputation: 16
Default Re: [REL] MySQL Plugin (Now on github!)

Uhm, Link for MySQL Library installation?
__________________


Server IP: 185.12.178.71:7799
Website: nyakos-rp.weebly.com
Beta Launched!
JasonRiggs is offline   Reply With Quote
Old 22/08/2017, 10:20 AM   #6113
Freedom.
Big Clucker
 
Join Date: Oct 2012
Location: Turkey
Posts: 137
Reputation: 8
Default Re: [REL] MySQL Plugin (Now on github!)

This occurs again.

Code:
*** Error in `./samp03svr': malloc(): memory corruption: 0xb75f6409 ***
======= Backtrace: =========
/lib/libc.so.6(+0x76a03)[0xb74b2a03]
Freedom. is offline   Reply With Quote
Old 03/09/2017, 01:02 PM   #6114
Cypress
Gangsta
 
Cypress's Avatar
 
Join Date: Dec 2009
Location: Germany
Posts: 901
Reputation: 109
Default Re: [REL] MySQL Plugin (Now on github!)

What could I possible do to avoid getting this frustrating error: error 075: input line too long (after substitutions)

Code:
mysql_format(
                    			mysql,
                    			query,
                    			sizeof( query ),
                    			"SELECT characters.id, `password`, `salt`, `ip`, `cash`, `gang_id`, `gang_level`, `rank`, `reputation_points`, \
                    			`overall_expenses`, `overall_earnings`, `kills`, `total_deaths`, `shots_fired`, `shots_hit`, `vip_level`, \
                    			`play_time`, `mute_time`, DATE(`date_created`) as `date_created`, \
                    			interactions.sign_in, UNIX_TIMESTAMP(`last_online`) as `last_online` \
                    			FROM `characters` INNER JOIN `interactions` ON characters.id = interactions.id WHERE `username` = '%e' LIMIT 1",
                    			player_data[ playerid ][ e_PLAYER_NAME ]
                			);

Yes, I need to load even more shit later, gets very big.
__________________


Cypress is offline   Reply With Quote
Old 09/09/2017, 09:32 AM   #6115
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 11,084
Reputation: 2647
Default Re: [REL] MySQL Plugin (Now on github!)

You have two options. You can use either or both. First is to use Zeex' fixed compiler that allows longer lines, second is to create view. A view is basically the output of a query that is presented as a virtual table and which can be read (but not written to) like any other table, e.g.

PHP Code:
CREATE VIEW CharacterInteraction AS SELECT characters.id, ... 
And then when you do

PHP Code:
SELECT FROM CharacterInteraction 
You'll get the output of the query that's behind it in real time.
__________________
Vince is offline   Reply With Quote
Old 10/09/2017, 07:15 PM   #6116
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 875
Reputation: 437
Default Re: [REL] MySQL Plugin (Now on github!)

R41-4 has been released.
Changelog:
- bug-fix: multi-line queries are not parsed correctly from files
- Windows 'libmariadb.dll' was faulty; this resulted in a connection error for some users

Download as always here.
maddinat0r is offline   Reply With Quote
Old 12/09/2017, 06:00 AM   #6117
wallee
Big Clucker
 
Join Date: Jan 2017
Posts: 152
Reputation: 23
Default Re: [REL] MySQL Plugin (Now on github!)

if i'm already using your log-core plugin i can ignore the log-core.dll or should i overwrite?
wallee is offline   Reply With Quote
Old 12/09/2017, 07:16 PM   #6118
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 875
Reputation: 437
Default Re: [REL] MySQL Plugin (Now on github!)

I'm always trying to use the latest available log-core version. So if you use the latest version of both plugins, the log-core should be the same. If you're not sure however, you can always download the log-core runtime here: https://github.com/maddinat0r/samp-log-core/releases
maddinat0r is offline   Reply With Quote
Old 20/09/2017, 10:38 AM   #6119
Aliassassin123456
Huge Clucker
 
Aliassassin123456's Avatar
 
Join Date: Apr 2013
Posts: 274
Reputation: 44
Default Re: [REL] MySQL Plugin (Now on github!)

I'm trying to compile latest version of the plugin using Ubuntu 14.04.5 and it fails with this error:
Code:
[100%] Building CXX object src/CMakeFiles/mysql.dir/main.cpp.o
Linking CXX shared module mysql.so
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
make[2]: *** [src/mysql.so] Error 1
make[1]: *** [src/CMakeFiles/mysql.dir/all] Error 2
make: *** [all] Error 2
CMake output:
Code:
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MySQLCAPI: /usr/include/mysql
-- CMake version: 3.1.3
-- Version: 4.0.0
-- Build type:
-- Performing Test HAVE_STD_CPP11_FLAG
-- Performing Test HAVE_STD_CPP11_FLAG - Success
-- Performing Test FMT_CPP11_CMATH
-- Performing Test FMT_CPP11_CMATH - Success
-- Performing Test FMT_CPP11_UNISTD_H
-- Performing Test FMT_CPP11_UNISTD_H - Success
-- Performing Test FMT_CPP11_SNPRINTF
-- Performing Test FMT_CPP11_SNPRINTF - Success
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES - Success
-- Performing Test SUPPORTS_INITIALIZER_LIST
-- Performing Test SUPPORTS_INITIALIZER_LIST - Failed
-- Performing Test SUPPORTS_ENUM_BASE
-- Performing Test SUPPORTS_ENUM_BASE - Success
-- Performing Test SUPPORTS_TYPE_TRAITS
-- Performing Test SUPPORTS_TYPE_TRAITS - Failed
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Looking for open
-- Looking for open - found
-- Looking for alloca.h
-- Looking for alloca.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Found SAMPSDK: /root/SA-MP-MySQL/libs/sdk
-- Configuring done
-- Generating done
-- Build files have been written to: /root/SA-MP-MySQL/build
MySQL libraries are in /usr/lib/x86_64-linux-gnu/, I tried to link them manually but failed.
No errors on compiling tho.
__________________
My GitHub.
My Skype.

Last edited by Aliassassin123456; 21/09/2017 at 11:46 AM.
Aliassassin123456 is offline   Reply With Quote
Old 20/09/2017, 10:57 AM   #6120
Jeroen52
Gangsta
 
Jeroen52's Avatar
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 796
Reputation: 55
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by Aliassassin123456 View Post
I'm trying to compile latest version of Ubuntu 14.04.5 and it fails with this error:
Code:
[100%] Building CXX object src/CMakeFiles/mysql.dir/main.cpp.o
Linking CXX shared module mysql.so
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
make[2]: *** [src/mysql.so] Error 1
make[1]: *** [src/CMakeFiles/mysql.dir/all] Error 2
make: *** [all] Error 2
CMake output:
Code:
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MySQLCAPI: /usr/include/mysql
-- CMake version: 3.1.3
-- Version: 4.0.0
-- Build type:
-- Performing Test HAVE_STD_CPP11_FLAG
-- Performing Test HAVE_STD_CPP11_FLAG - Success
-- Performing Test FMT_CPP11_CMATH
-- Performing Test FMT_CPP11_CMATH - Success
-- Performing Test FMT_CPP11_UNISTD_H
-- Performing Test FMT_CPP11_UNISTD_H - Success
-- Performing Test FMT_CPP11_SNPRINTF
-- Performing Test FMT_CPP11_SNPRINTF - Success
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES - Success
-- Performing Test SUPPORTS_INITIALIZER_LIST
-- Performing Test SUPPORTS_INITIALIZER_LIST - Failed
-- Performing Test SUPPORTS_ENUM_BASE
-- Performing Test SUPPORTS_ENUM_BASE - Success
-- Performing Test SUPPORTS_TYPE_TRAITS
-- Performing Test SUPPORTS_TYPE_TRAITS - Failed
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Looking for open
-- Looking for open - found
-- Looking for alloca.h
-- Looking for alloca.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Found SAMPSDK: /root/SA-MP-MySQL/libs/sdk
-- Configuring done
-- Generating done
-- Build files have been written to: /root/SA-MP-MySQL/build
MySQL libraries are in /usr/lib/x86_64-linux-gnu/, I tried to link them manually but failed.
No errors on compiling tho.
Try this then recompile.
PHP Code:
sudo apt-get install mysql-client:i386
sudo apt
-get install libmysqlclient-dev:i386 
__________________
Jeroen52 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:47 AM.


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