• tmysql4 - A multi-connection version of tmysql3 (Now with mysqloo wrapper!)
    384 replies, posted
[QUOTE=Bambo.;48765968]Link provided is down (16:52 26/09) uploaded a mirror here [url]http://www.richardbamford.io/dmp/gmsv_tmysql4_win32.zip[/url][/QUOTE] Works fine for me?
[QUOTE=BlackAwps;48768223]Works fine for me?[/QUOTE] It was down at the time that he posted it, now it is working again. It just kept loading the page and never finished.
So I just updated this. [url]http://breakpoint.me/test/gmsv_tmysql4_linux.dll[/url] I added a fourth argument to Database:Query to return data with numbers for field values instead the string field name. This also fixes an issue where it was reading the wrong argument for the optional object. I just setup my build system for this, so I'm uploading this as a test so I know it works. I don't have the tools available to build this for windows just yet.
I'll wait for a windows build before I test your wrapper
I'll try to get a windows build out sometime today, hopefully.
[QUOTE=BlackAwps;48909384]I'll try to get a windows build out sometime today, hopefully.[/QUOTE] Actually, I ripped out the new bit you put in so I could test it. There's a few minor errors and quirks. - Need to set [I]abort = false[/I] in the metatable for gofuckurself - typo in [I]function seriouslyeatadick:onSuceess(data)[/I] should be onSuc[B]c[/B]ess I got the wrapper working, but I am head scratching again because my original utf8 problem is still there ... /sigh
Windows build done. Everything is statically linked and I mean EVERYTHING. No more libmysql.dll needed. [url]http://breakpoint.me/test/gmsv_tmysql4_win32.dll[/url] [QUOTE=Blasteh;48910300]Actually, I ripped out the new bit you put in so I could test it. There's a few minor errors and quirks. - Need to set [I]abort = false[/I] in the metatable for gofuckurself - typo in [I]function seriouslyeatadick:onSuceess(data)[/I] should be onSuc[B]c[/B]ess I got the wrapper working, but I am head scratching again because my original utf8 problem is still there ... /sigh[/QUOTE] You didn't really have to rip it out, it wouldn't have error'd but it just wouldn't have done anything. Also thanks, I'll update my post to fix those errors. Also, you just need to set the charset now. If you add this to the wrapper.. [lua]function gofuckurself:setCharset(str) self.db:SetCharacterSet(str) -- Look at me, adding fuctionality to mysqloo WHAT A NICE GUY I AM end[/lua] You could do something like Database:setCharset("utf8")
I've forced it all server side so it looks like this: [code] 1: Value = utf8mb4 Variable_name = character_set_client 2: Value = utf8mb4 Variable_name = character_set_connection 3: Value = utf8mb4 Variable_name = character_set_database 4: Value = binary Variable_name = character_set_filesystem 5: Value = utf8mb4 Variable_name = character_set_results 6: Value = utf8mb4 Variable_name = character_set_server 7: Value = utf8 Variable_name = character_set_system 8: Value = C:\Program Files\MySQL\MySQL Server 5.6\share\charsets\ Variable_name = character_sets_dir 9: Value = utf8mb4_general_ci Variable_name = collation_connection 10: Value = utf8mb4_unicode_ci Variable_name = collation_database 11: Value = utf8mb4_unicode_ci Variable_name = collation_server [/code] I'll try setting the charset anyway and see where it gets me...
Set the encoding clientside (YOUR LUA CODE) for escaping to work properly!
Well, I think my "real" problem is something else... because I can get this 💩 (high numbered utf8 astral symbol) inserted in to the database without any issues, but certain character combinations will throw that mysql error... I'll have to reinvestigate this at some other point, utf8mb4 support works with tmysql4; my problem is just similar but different. /sigh
You should try mariadb if you have issues with encoding. It's what I used for my servers when I ran some and never had any encoding issues.
[QUOTE=BlackAwps;48910849]You should try mariadb if you have issues with encoding. It's what I used for my servers when I ran some and never had any encoding issues.[/QUOTE] I'll have to give that a go, but will need to do it some time next week -.- I need more time in a day.
[code] lua_run require"tmysql4" > require"tmysql4"... [ERROR] lua_run:1: Couldn't load module library! 1. require - [C]:-1 2. unknown - lua_run:1 [ERROR] lua_run:1: Couldn't load module library! 1. require - [C]:-1 2. unknown - lua_run:1 [/code] On Fedora Linux. Other modules work fine (including mysqloo). I don't have much experience in Linux, i might be missing something important. I tried ldd command, all .so seem to be in place. [code] ldd gmsv_tmysql4_linux.dll linux-gate.so.1 (0xf7724000) libstdc++.so.6 => /lib/libstdc++.so.6 (0xf71f8000) libm.so.6 => /lib/libm.so.6 (0xf71aa000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf718c000) libc.so.6 => /lib/libc.so.6 (0xf6fc0000) /lib/ld-linux.so.2 (0x5657d000) ls /lib/libstdc++.so.6 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/libc.so.6 /lib/ld-linux.so.2 /lib/ld-linux.so.2 /lib/libgcc_s.so.1 /lib/libstdc++.so.6 /lib/libc.so.6 /lib/libm.so.6 [/code]
Hmm that's weird. I stataically linked everything now including libmysqlclient. The only thing I could think of is your glibc runtime is old or something? Could you tell me what version you use and I'll compare it with the one I built it with. I built it and tested it on debian jessie, so I know it at least works on that. You can find your version with [code]ldd --version[/code] My little compiler box is running 2.19-22 [editline]17th October 2015[/editline] Also here is the sha1sum of it, just to make sure you have the right version. [code]sha1sum gmsv_tmysql4_linux.dll 2fb8b8606327e8191279ef546147bd0a52c435d6 gmsv_tmysql4_linux.dll[/code]
[code] ldd --version ldd (GNU libc) 2.21 sha1sum gmsv_tmysql4_linux.dll 2fb8b8606327e8191279ef546147bd0a52c435d6 gmsv_tmysql4_linux.dll [/code]
That's really strange. You have a newer version so it should be fine. I could make a special build for you and not statically link libmysqlclient, but I have no idea if that's the reason you're having problems. If worst comes to worst, you could try building it from source, which isn't all that difficult to do. [editline]17th October 2015[/editline] Ok here. [url]http://breakpoint.me/test/gmsv_tmysql_linux_unlinked.dll[/url] Just remember to rename it right. And here's the libmysqlclient binaries [url]http://breakpoint.me/test/libmysqlclient.tar.gz[/url]
[img]http://i.imgur.com/xPuHGfZ.png[/img] [img]http://i.imgur.com/Z3FPtPn.png[/img] [code]lua_run require"tmysql_u" > require"tmysql_u"... [ERROR] lua_run:1: Couldn't load module library! 1. require - [C]:-1 2. unknown - lua_run:1 [ERROR] lua_run:1: Couldn't load module library! 1. require - [C]:-1 2. unknown - lua_run:1[/code]
I really don't know what to tell you. Here's the older build without the latest changes and fixes that I made almost a year ago. [url]http://breakpoint.me/gmsv_tmysql4_linux.dll[/url] So with this version you can only have results with field-names and the optional object argument doesn't work properly. [editline]17th October 2015[/editline] I also just tried it on Ubuntu 14.04 and it works fine there too. There's something on your end causing it to fail to load. [img]http://i.imgur.com/FwTBdof.png[/img] Debian on left, Ubuntu on right.
There's not much that can be done until gmod gets more descriptive errors. Which will probably never happen, so if you get it to work please do tell us what you did
I tried what Python1320 suggested [url=https://facepunch.com/showthread.php?t=1485127&p=48928932&viewfull=1#post48928932]here[/url] and got this: [code] > require"tmysql4"... 18706: bin/libstdc++.so.6: error: version lookup error: version `GLIBCXX_3.4.21' not found [/code]
Nice. Now I know nothing about fedora, but you should see if you can upgrade your libstdc++ because whatever you have is too old. I could try compiling it on wheezy later today though, if you can't figure something out, and that should have an old enough compiler that it will run on your setup.
So, the problem was completely on our side. After one of GMod updates, we had to provide it with a copy of libstdc++ to make it work. Of course, later everyone forgot about that. Sorry for making you search for solutions for non-existent issue.
It's cool, I'm glad you figured it out. I figured it was something on your end.
So im having some troubles installing your module, it seems bjam errors on use ? Could anyone help me ? Could somebody maybe make a more in depth tutorial. [img]http://puu.sh/kQgyQ/c9faca3268.png[/img]
You're trying to build it from source? Just download the already compiled dll
I don't think so ? I downloaded your module, put it in lua/bin [img]http://puu.sh/kQGQA/62077d807e.png[/img] I downloaded libmysql and put it in the root [img]http://puu.sh/kQGOA/447fece27b.png[/img] Ran the server and it didn't work, Then i tried downloading boost and lib connector ( Like stated in the original post, but now it seems to be gone ) Edit: Worked fine with mysqloo? and i installed it the exact same way as this one.
well you showed us its installed correctly but didn't actually explain what kind of error there is. this module has no extra dependencies anymore. be more verbose
Yeah, if you could please run your server following the directions [url=https://facepunch.com/showthread.php?t=1485127&p=48928932&viewfull=1#post48928932]HERE[/url] and giving us a little more info, I would be happy to help.
Other then to boost error, which isn't needed ? I get this error in console. [img]http://i.imgur.com/6iDGwGG.png[/img]
That's not very useful. Can you disable your addons, run your server in debug mode as described in this link [url]https://facepunch.com/showthread.php?t=1485127&p=48928932&viewfull=1#post48928932[/url] Mainly [code]LD_LIBRARY_PATH=garrysmod/bin:bin:. LD_DEBUG=libs ./srcds_linux -game garrysmod +map gm_construct[/code] run [code]lua_run require"tmysql4"[/code] and report the error back to us please?
Sorry, you need to Log In to post a reply to this thread.