[RELEASE] libMysql for R34083

12/24/2013 20:35 deco016#1
Hey,few days i created lib for new quest function mysql.execute like mysql.query in lib for r2089. Today is a christmas and i publish this lib in elitepvpers. I'm from poland and i don't like polish forums becouse users is still rips from other country forums.


THIS ONLY FOR REVISION 34083!!
Download:
Code:
https://mega.co.nz/#!xswAEBAI!cOegNW8vRNg9hofph7IH0xXlf8tp6GZgRrg8SsCNWjo
Code:
http://www6.zippyshare.com/v/655717/file.html
Virustotal:
Code:
https://www.virustotal.com/pl/file/2169bc2413fc0821ac057008277394cab557121a14150d4583a9c0c15de2ff82/analysis/1387912797/
My lib require libmysqlclient.so.18 and libstdc++.so.6

libmysqlclient.so.18
Code:
https://mega.co.nz/#!Il4w1A7A!H-k0vSeNYDXCxBTELMavaCndNJcn4U020e-aw3Im5TM
Code:
http://www6.zippyshare.com/v/43921991/file.html
Virustotal:
Code:
https://www.virustotal.com/pl/file/fdc974c402890fbf113ff40b978b1674dcd72b1dc2f091cdd59fbbf8a47303d4/analysis/1387912961/
libstdc++.so.6
Code:
http://imer.cc/files/libstdc++.so.6
Libs move to /usr/lib or for Freebsd x64 to /usr/lib32/


Usage libMysql:

Start game with command
For x64 (amd64):
Code:
env LD_32_PRELOAD=./libMysql.so ./game
For x32 (i386):
Code:
env LD_PRELOAD=./libMysql.so ./game
Add to quest_functions:
Code:
mysql.execute
Quest example:

SELECT
Code:
quest libmysql begin
	state start begin
		when login begin
			local mysql = mysql.execute("SELECT name,level FROM player.player LIMIT 2")
			say("Player 1: "..mysql[1][1].." Lv. "..mysql[1][2])
			say("Player 2: "..mysql[2][1].." Lv. "..mysql[2][2])
		end
	end
end
Quest example #2
Code:
quest libmysql begin
	state start begin
		when login begin
			local mysql = mysql.execute("SELECT name,level FROM player.player LIMIT 2")
			for key,value in pairs(mysql) do
				say("Player"..key..": "..value[1].." Lv. "..value[2])
			end
		end
	end
end
Note: If query is empty or error function return false (boolean)
UPDATE,INSERT,REPLACE,DELETE[..]
Code:
quest libmysql begin
	state start begin
		when login begin
			mysql.execute("UPDATE player.player SET level=99 WHERE level>99")
		end
	end
end
If you have problem with lib please send PM to me.

Thanks to iMer:)

Merry Christmas and sorry if my english is bad for reading this topic :p
12/24/2013 22:14 .MaisKolben™#2
Thank you! Useful stuff :).
Merry Christmas

Kind regards
12/24/2013 22:44 #SoNiice#3
I'm more interested in the source actually.
12/24/2013 22:46 deco016#4
Sorry, i can't publish source,if you interested my lib check it in IDA :)
12/24/2013 23:13 iMer#5
Quote:
Originally Posted by Hühnchenkopf View Post
I'm more interested in the source actually.
[Only registered and activated users can see links. Click Here To Register...]
Thre is a mysql query example.
Adding quest functions is in there too.
the rest is just putting things together ;)

It's nice to see my sdk being actively used to create awesome stuff like this :)
Really good work.

iMer
12/24/2013 23:28 0x52656D6978#6
Quote:
I'm from poland and i don't like polish forums becouse users is still rips from other country forums.
Uhh..
Joke, just kidding..
Thanks for the release.
12/24/2013 23:46 Yiv#7
Was ist denn der Unterschied zur Questfunktion von Mijago? :o

Where is the difference between this and the function Mijago published some time ago? :o

MfG
12/24/2013 23:49 'ChuckNorris#8
Quote:
Originally Posted by DaJuBi View Post
Was ist denn der Unterschied zur Questfunktion von Mijago? :o

Where is the difference between this and the function Mijago published some time ago? :o

MfG
Der Unterschied ist das diese Lib mit den MySQL Funktionen von dem Core arbeitet (denke ich mal).

Hast du gut gemacht allerdings auch nicht wirklich schwer mit der Lib von iMer.
Nice work, but not difficult with the lib from iMer.

King regards
Chuck.
12/25/2013 00:04 deco016#9
Quote:
Originally Posted by DaJuBi View Post
Was ist denn der Unterschied zur Questfunktion von Mijago? :o

Where is the difference between this and the function Mijago published some time ago? :o

MfG
This distinguishes the functions that my use core function for query and result but Mijago still using os.execute and there are problems with the mysql results
Quote:
Originally Posted by [LxR]ChuckNorris View Post
Der Unterschied ist das diese Lib mit den MySQL Funktionen von dem Core arbeitet (denke ich mal).

Hast du gut gemacht allerdings auch nicht wirklich schwer mit der Lib von iMer.
Nice work, but not difficult with the lib from iMer.

King regards
Chuck.
clear that it is not difficult but nobody published compiled lib
12/25/2013 00:04 Yiv#10
Quote:
Originally Posted by [LxR]ChuckNorris View Post
Der Unterschied ist das diese Lib mit den MySQL Funktionen von dem Core arbeitet (denke ich mal).

Hast du gut gemacht allerdings auch nicht wirklich schwer mit der Lib von iMer.
Nice work, but not difficult with the lib from iMer.

King regards
Chuck.
Gibt es irgendeinen Performance-Vorteil, oder ist es eig. egal welche Methode man benutzt? :o

MfG
12/25/2013 00:06 'ChuckNorris#11
Quote:
Originally Posted by DaJuBi View Post
Gibt es irgendeinen Performance-Vorteil, oder ist es eig. egal welche Methode man benutzt? :o

MfG
Ja, ich glaub bei der Questerweiterung wurde immer wieder eine neue Verbindung aufgebaut, welches hier nicht der Fall ist da es halt über den Core geht.

Gruß,
Chuck
12/25/2013 00:08 deco016#12
Quote:
Originally Posted by DaJuBi View Post
Gibt es irgendeinen Performance-Vorteil, oder ist es eig. egal welche Methode man benutzt? :o

MfG
Using os.execute and open files for get result is not good becouse if you running big query or with special characters results is empty or crashed lua with error in syserr but my lib using core function for query and result and pushing to lua table not to file. You can read result faster with my function and not creating subproceses for read/write file with lua

I don't speak german but i use google translator if i my answer is wrong = sory
12/25/2013 03:41 K.A.K.A.S.H.I#13
Thanks for the release.
12/25/2013 13:13 miguelmig#14
Hum, VirusTotal isn't really enough to tell me that your lib is safe ( no backdoor, no virus, no botnet ) but Thanks for the release anyways.
12/25/2013 13:15 'ChuckNorris#15
Quote:
Originally Posted by miguelmig View Post
Hum, VirusTotal isn't really enough to tell me that your lib is safe ( no backdoor, no virus, no botnet ) but Thanks for the release anyways.
Open the lib with IDA and see the pseudo code.

King regards,
Chuck