[Plugin] MySQL & PostgreSQL Plugin

version 2.6:
Код:
...\include\sql.inc(534) : error 017: undefined symbol "addresses"
i've checked the inc but "addresses" is there, wtf? :/
Reply

Quote:
Originally Posted by fordawinzz
Посмотреть сообщение
version 2.6:
Код:
...\include\sql.inc(534) : error 017: undefined symbol "addresses"
i've checked the inc but "addresses" is there, wtf? :/
Sorry, forgot an old bug of the Pawn compiler. Download the .inc file again or the whole package.
Reply

Quote:
Originally Posted by Dan..
View Post
P.S. I fixed that clock_gettime() issue. Thanks for the report!
No problem! Every fixed bug is a good bug

Quote:
Originally Posted by Dan..
View Post
- visual logging (HTML log) - Yeah sure, because a pile of shit (HTML tags) is always better. Let's also take into consideration that there are many browsers that can open a .HTML file that's over 100mbs.
Using the HTML log to log debug messages is sure silly.
Users prefer such visual logging (as far as I saw) because it is easier to find code mistakes with it.

Quote:
Originally Posted by Dan..
View Post
- multi-threading - I lol'd in real life when I read this. The way I handle multi-threading is the real way. Your plugin fetches malformed results. Anyway, you can manually implement a pool in Pawn or wait for me to do it in v2.7.
Why should the results be malformed? Before being such an arrogant smart-ass you should really consider reading the MySQL documentation.
Quote:
Originally Posted by MySQL documentation
Many threads can access different result sets that are retrieved with mysql_store_result().
Source: http://dev.mysql.com/doc/refman/5.1/...d-clients.html
Quote:
Originally Posted by Dan..
View Post
? ORM-like system (R33+) - proof or gtfo :hurr:
Are you 14 or something?

Quote:
Originally Posted by Dan..
View Post
+ y_inline support - I didn't have any plans on implementing it, but now that you mention, it's there.
Good job.
Quote:
Originally Posted by Dan..
View Post
+ unthreaded queries - People don't have to put much effort to convert their old scripts and get rid of bugs. In some cases (especially in OnGameModeInit and OnGameModeExit) unthreaded queries are required.
+ PostgreSQL support - Cool or what?
Yes, I already mentioned these in my previous post.

Quote:
Originally Posted by Dan..
View Post
+ "live" (a.k.a. non-cached) queries - Especially when a large amount of data has to be loaded.
But I forgot to mention this one, sorry!

Quote:
Originally Posted by Dan..
View Post
+ striking resemblance with SQLite api - It comes in handy for users that want to convert their old scripts.
Some macros and define's could also do this. Okay, the natives of your plugin and the SQLite api are similar and thus not every time a macro/define can be used there. Well, I'm restricted to the current natives, I can't just change their syntax.

Quote:
Originally Posted by Dan..
View Post
+ proper result handling
What's so wrong with the way I handle results?

Quote:
Originally Posted by Dan..
View Post
+ parameters can be pushed by reference - Great, ain't it?
In what scenario can this be useful?

Quote:
Originally Posted by Dan..
View Post
+ multiple result sets
Again, as I said (indirectly) in my previous post, my plugin also offers this feature. I didn't mentioned features our both plugins have.
Quote:
Originally Posted by Dan..
View Post
Your plugin might be faster (I still don't believe your results), but mine offers reliability.
Why shouldn't you believe my results? Like I need to lie about some benchmarks.
Yes, your plugin seems stabler than mine, but I'm always working on the stability.
Quote:
Originally Posted by Dan..
View Post
I also did a quich benchmark, output:
Code:
GO!!! (Dan)      | now = 45693129 (start)
connected        | now = 45693134 | now - last =     5 | now - start =     5
scheduled        | now = 45693136 | now - last =     2 | now - start =     7
done             | now = 45693137 | now - last =     1 | now - start =     8
executed         | now = 45702784 | now - last =  9647 | now - start =  9655
----------------------------------------------------------------------------
GO!!! (BlueG)    | now = 45729908 (start)
connected        | now = 45729913 | now - last =     5 | now - start =     5
scheduled        | now = 45729915 | now - last =     2 | now - start =     7
done             | now = 45729919 | now - last =     4 | now - start =    11
executed         | now = 45742206 | now - last = 12287 | now - start = 12298
As I posted my results before, R31/32 is pretty slow ATM.

You seem like a good plugin developer, but with a really bad personality. Instead of being so rude/aggressive you should start being productive and help everyone (not just the users of your plugin(s)).
Reply

Quote:
Originally Posted by Pain123
View Post
Why should the results be malformed? Before being such an arrogant smart-ass you should really consider reading the MySQL documentation.
Source: http://dev.mysql.com/doc/refman/5.1/...d-clients.html
I read the documentation aswell, I saw that part, but it's not true. Any function of the C api that handles a result must be wrapped in a Mutex or the result might be malformed (I read this in a mailing list, a while ago, while I was implementing the concurrent design). This usually occurs when the MySQL server is remote or the result is very big.

Quote:
Originally Posted by Pain123
View Post
In what scenario can this be useful?
non-threaded queries + callbacks => to return multiple fields

Quote:
Originally Posted by Pain123
View Post
Again, as I said (indirectly) in my previous post, my plugin also offers this feature. I didn't mentioned features our both plugins have.
Last time I checked, yours didn't?

Quote:
Originally Posted by Pain123
View Post
You seem like a good plugin developer, but with a really bad personality. Instead of being so rude/aggressive you should start being productive and help everyone (not just the users of your plugin(s)).
I'm aggressive only toward stupid people.
Reply

This plugin is better than the R35?
How much more stable?
How much faster?
1,000 server A plugin which is the better choice?
Y_Less can develop this plugin?
Reply

[ OFF ]
Quote:
Originally Posted by d711728
View Post
This plugin is better than the R35?
How much more stable?
How much faster?
1,000 server A plugin which is the better choice?
Y_Less can develop this plugin?
Yes is better than r35.
r35 have major bug, listening one beta tester.
More faster than r35 watch:
Code:
This plugin v2.0 - 12178 ms
BlueG's plugin R21 - 53357 ms
Yes for 1,000 server slots is a better choice.
Y_Less can develop this plugin? IDK( I don't know ).

[ ON ]
I'm use this plugin, Dan you make me happy )).
Reply

Why does the speed matter? You should choose the plugin which provides the best features. I just made a speed test for you anyway, RoW001.

Code:
#1 BlueG/maddinat0r: 4519 ms (R37)
#2 Dan..: 7173 ms (2.6)
#3 Andre's SFSE plugin?: 26158 ms (v1?)
https://mega.co.nz/#!ltQgHZwL!DonDSd...oV_uJUzKrkZ_v0

Sorry if I made a mistake in it, did it very quick out of fun.
Reply

i took after:
Code:
This plugin v2.0 - 12178 ms
BlueG's plugin R21 - 53357 ms
I'm not maked a speed test .
Reply

Quote:
Originally Posted by RoW001
View Post
i took after:
Code:
This plugin v2.0 - 12178 ms
BlueG's plugin R21 - 53357 ms
I'm not maked a speed test .
Don't look that please. 'R21' is quite old revision of BlueG's plugin, the latest revision is R37, try to do tests with the latest one and see. BlueG's plugin is MORE stable, and faster as compared to this one.
Reply

There is a small bug in sql_format:

pawn Code:
native sql_format(handle, dest[], dest_len = sizeof(dest), format[], {Float, _}:...);
should be:

pawn Code:
native sql_format(SQL:handle, dest[], dest_len = sizeof(dest), format[], {Float, _}:...);
Reply

Quote:
Originally Posted by Mellnik
View Post
Why does the speed matter? You should choose the plugin which provides the best features. I just made a speed test for you anyway, RoW001.

Code:
#1 BlueG/maddinat0r: 4519 ms (R37)
#2 Dan..: 7173 ms (2.6)
#3 Andre's SFSE plugin?: 26158 ms (v1?)
https://mega.co.nz/#!ltQgHZwL!DonDSd...oV_uJUzKrkZ_v0

Sorry if I made a mistake in it, did it very quick out of fun.
Hey. Interesting results, but they seem to be for an older version of my plugin (newer one does not have a connect native, but loads the data from a file - sort of a bad decision, but I did not go to recreating the function because my code connected internally).

Nevertheless, I assume these results are correct since you do call 1000 queries. Benchmarked versions of the other 2 plugins already support processing multiple queries at once. What mine does is block new queries from being ran and processed before the server ticks (ProcessTick) and the returning callback is called. The others AFAIK don't do that and allow more than one query to be pipelined for PAWN returning callback execution, so one ProcessTick can handle calling OnTableFetch more than once.

I have, about a year ago I reckon, benchmarked my plugin against the other two by handling a result set of 300k rows. I was able to speed mine up very decently by, for example, calling .reserve(300000) on the vector before passing the rows to it (and it makes perfect sense, this saves a ton of reallocations) and compiling with -O3 (on a newer gcc, might go for -Ofast). Also mine does not incorporate a ton of security checks because my plugin was mostly for personal use, so I knew what I was doing with 4-5 years of experience already. Also had simpler handling of NULL values and AMX callback parameters. All this led to my plugin being 3-4 times faster at processing these rows.

Go for the plugin which offers the best set of features unless the processing times don't differ a tenfold!
Reply

Hello!
I'm having a little issue. After updating to 0.3z, sql.dll plugin has stopped working. Here's the log:
Code:
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team

[17:18:27] filterscripts = ""  (string)
[17:18:27] 
[17:18:27] Server Plugins
[17:18:27] --------------
[17:18:27]  Loading plugin: sql.dll
[17:18:27]   Failed.
[17:18:27]  Loading plugin: sscanf
[17:18:27] 

[17:18:27]  ===============================

[17:18:27]       sscanf plugin loaded.     

[17:18:27]          Version:  2.8.1        

[17:18:27]    © 2012 Alex "Y_Less" Cole  

[17:18:27]  ===============================

[17:18:27]   Loaded.
[17:18:27]  Loading plugin: streamer
[17:18:27] 

*** Streamer Plugin v2.7 by Incognito loaded ***

[17:18:27]   Loaded.
[17:18:27]  Loading plugin: whirlpool
[17:18:27]  
[17:18:27]  ==================
[17:18:27]  
[17:18:27]   Whirlpool loaded
[17:18:27]  
[17:18:27]  ==================
[17:18:27]  
[17:18:27]   Loaded.
[17:18:27]  Loading plugin: crashdetect
[17:18:27]   CrashDetect v4.10 is OK.
[17:18:27]   Loaded.
[17:18:27]  Loaded 4 plugins.

[17:18:27] 
[17:18:27] Filterscripts
[17:18:27] ---------------
[17:18:27]   Loaded 0 filterscripts.

[17:18:27] [debug] Run time error 19: "File or function is not found"
[17:18:27] [debug]  sql_connect
[17:18:27] [debug]  sql_num_rows
[17:18:27] [debug]  sql_get_field_assoc_int
[17:18:27] [debug]  sql_query
[17:18:27] [debug]  sql_get_field_assoc_int_ex
[17:18:27] [debug]  sql_get_field_assoc_float_ex
[17:18:27] [debug]  sql_get_field_assoc_float
[17:18:27] [debug]  sql_get_field_assoc
[17:18:27] [debug]  sql_next_row
[17:18:27] [debug]  sql_free_result
[17:18:27] [debug] Run time error 19: "File or function is not found"
[17:18:27] [debug]  sql_connect
[17:18:27] [debug]  sql_num_rows
[17:18:27] [debug]  sql_get_field_assoc_int
[17:18:27] [debug]  sql_query
[17:18:27] [debug]  sql_get_field_assoc_int_ex
[17:18:27] [debug]  sql_get_field_assoc_float_ex
[17:18:27] [debug]  sql_get_field_assoc_float
[17:18:27] [debug]  sql_get_field_assoc
[17:18:27] [debug]  sql_next_row
[17:18:27] [debug]  sql_free_result
[17:18:27] Script[gamemodes/uus4.amx]: Run time error 19: "File or function is not found"
[17:18:27] Number of vehicle models: 0
Reply

is PostgreSQL faster than MySQL?
Reply

MySQL is said to be faster but PostgreSQL becomes much faster if the quarry is heavy
Reply

What about threaded queries, how to get data in called callback? Is there built-in parameters?
Reply

Any updated link for windows?!
Reply

Quote:
Originally Posted by khimera
Посмотреть сообщение
Any updated link for windows?!
Compiled on Windows 7 x64
- http://puu.sh/bSxSV/2af7500b5d.dll
Reply

Website isn't working
Reply

http://forum.sa-mp.com/showthread.ph...69#post3285869 Can someone tell me why this isn't working?
Reply

Website isn't working
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)