SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/08/2017, 11:20 AM   #6111
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, 02:02 PM   #6112
Cypress
Gangsta
 
Cypress's Avatar
 
Join Date: Dec 2009
Location: Germany
Posts: 903
Reputation: 116
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, 10:32 AM   #6113
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 11,045
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, 08:15 PM   #6114
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 881
Reputation: 459
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, 07:00 AM   #6115
wallee
Huge Clucker
 
Join Date: Jan 2017
Posts: 224
Reputation: 33
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, 08:16 PM   #6116
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 881
Reputation: 459
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, 11:38 AM   #6117
Aliassassin123456
Huge Clucker
 
Aliassassin123456's Avatar
 
Join Date: Apr 2013
Posts: 246
Reputation: 47
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 12:46 PM.
Aliassassin123456 is online now   Reply With Quote
Old 20/09/2017, 11:57 AM   #6118
Jeroen52
Gangsta
 
Jeroen52's Avatar
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 803
Reputation: 62
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
Old 20/09/2017, 12:11 PM   #6119
Aliassassin123456
Huge Clucker
 
Aliassassin123456's Avatar
 
Join Date: Apr 2013
Posts: 246
Reputation: 47
Default Re: [REL] MySQL Plugin (Now on github!)

I got so many errors trying to install those, I think I should install i386 version of the OS but is that really necessary? isn't there another way?
__________________
My GitHub.
My Skype.
Aliassassin123456 is online now   Reply With Quote
Old 20/09/2017, 12:17 PM   #6120
Jeroen52
Gangsta
 
Jeroen52's Avatar
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 803
Reputation: 62
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by Aliassassin123456 View Post
I got so many errors trying to install those, I think I should install i386 version of the OS but is that really necessary? isn't there another way?
What errors did you get?
__________________
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 05:22 PM
MySQL Plugin R5 plugin problem dud Scripting Help 12 05/12/2011 07:28 PM
Strikens Mysql vs BlueG's Mysql plugin PrawkC Scripting Help 4 30/09/2011 11:30 AM
[help][plugin] Can't load mysql plugin mariomako Help Archive 8 16/07/2011 03:37 PM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 03:32 PM


All times are GMT. The time now is 03:44 AM.


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