World: r3wp
[MySQL]
older newer | first last |
Will 13-Jun-2008 [955] | Does anyone experimented with the sphinx search engine? http://www.sphinxsearch.com/ |
Dockimbel 27-Jun-2008 [956x3] | Here's a handy function to test if a MySQL server is up : |
mysql-alive?: func [/host ip /port n /local p][ either attempt [ p: open/direct/no-wait join tcp:// [ either host [ip][127.0.0.1] #":" either port [n][3306] ] ][ close p yes ][ no ] ] | |
you can also use a simple : port: attempt [ open mysql://... ] | |
Will 27-Jun-2008 [959] | ok but your driver should reconnect automagically 8-) |
Dockimbel 27-Jun-2008 [960] | Yes if the server is just restarted, no problem, the driver will reconnect. |
james_nak 27-Jun-2008 [961] | You rock Doc. Thanks. That was an answer several years in the making! |
Maarten 28-Jun-2008 [962x2] | Will, I have, and for Qtask I have even implemented the search protocol in REBOL. It's fast. |
(i.e. the search client protocol that can talk to Sphinx). You can also compile a client in mysql and then use sql for your queries. | |
Will 1-Jul-2008 [964x3] | Maarten: that is great news! Do you plan on releasing it for the rest of us? |
would there be any advantage having rebol as an external language plugin compared to Dock sheme? http://forge.mysql.com/wiki/ProjectPage_External_Language_Stored_Procedures | |
bad question, but it would be cool to program stored procedures in rebol | |
Will 2-Jul-2008 [967] | here is a short and concise presentation about sphinx http://www.scribd.com/doc/2670976/Sphinx-High-Performance-Full-Text-Search-for-MySQL-Presentation |
Maarten 2-Jul-2008 [968] | Will: I'll have to ask Reichart. |
Will 2-Jul-2008 [969] | Please 8P |
Pekr 3-Jul-2008 [970x2] | Guys, what do you think about Tim Johnson's ml remark? Could we help him somehow? ----------------------------------- I've been using mysql-protocol (Mysql Scheme) and cgi for many years now. I really like it, but I think that /command would bring some advantages, if it can directly access the "C" API for MySQL. Example: Using the mysql scheme on a tcp/ip connection, I have to code the escaping of special characters for insert and updates and code the unescaping of special characters for retrieval. Using the C API from other scripting languages, the mysql_real_escape_string() function handles the escaping _appropriate_ to the version, and queries are similarly unescaped. |
Isn't REBOL fast enough for most operations in regards to MySQL? Wouldn't it be sufficient to write such escaping fun in REBOL? | |
Gabriele 3-Jul-2008 [972] | about escaping, Nenad's driver has such functions already, so i don't see that as an advantage for the native driver. Qtask has a native driver too (for speed reason with large record sets), but remember that when you use the mysql c library either your app has to be GPL or you need a license from MySQL (Qtask has a license). |
Will 3-Jul-2008 [973] | I have a mysql wrapper that I use in production but haven't released because it need cleaning and docs, but if there is interest I could release for testing as is. id does things like: print .db/get/all/sort/debug [mailing/m mailingLog/ml] [ml.dc m.email ml.url] [{ml._mailing=m.id}] [m.email asc ml.dc desc] SELECT `ml`.`dc`,`m`.`email`,`ml`.`url` FROM `mailing` `m`,`mailingLog` `ml` WHERE ml._mailing=m.id ORDER BY `m`.`email`,`ml`.`dc` DESC print .db/set/debug 'mailing 12 reduce['active false] UPDATE `mailing` SET `active`=0 WHERE id=12.0 print .db/get/all/flat/debug '_node_tree [_node _media] [{_tree=? AND _issue=?} 5443 22] SELECT `_node`,`_media` FROM `_node_tree` WHERE _tree='5443' AND _issue='22' .. |
james_nak 3-Jul-2008 [974] | Will, that would be sweet. |
Graham 5-Jul-2008 [975] | Gabriele, I thought you only needed a license if you are releasing your software .... |
Gabriele 6-Jul-2008 [976] | graham, i'm not entirely sure, in principle the GPL2 is as you say, however i'm not sure if MySQL has a different interpretation here. iirc the GPL3 states that being a server for users is the same as releasing the software. |
BrianH 6-Jul-2008 [977x2] | No, that's the Affero GPL. |
They took that clause out of the regular GPL3 during the review process, after many protested it. | |
Graham 7-Jul-2008 [979] | So, looks like you didn't need a license |
Gabriele 7-Jul-2008 [980] | Qtask? no, it does, because you can also put qtask on your own server. |
Graham 7-Jul-2008 [981] | Has that happened yet? |
Gabriele 7-Jul-2008 [982] | i don't think you can buy it right now, and the focus has shifted to the SaaS model, but otherwise there are no major tech obstacles iirc. ask reichart for more details, i'm not really up to date on the marketing/sales stuff :) |
Graham 7-Jul-2008 [983] | He's often mentioned that they are considering open sourcing qtask in which again the license was not needed! |
Gabriele 7-Jul-2008 [984] | well, not all of qtask, but again i don't really know. i know they talked to mysql and all is fine. i'm not implying they paid or are paying money, since i don't know. my point is that Qtask has permission from MySQL to do what they do, while you may not if you were to use the same code. Is that more clear? |
Graham 7-Jul-2008 [985] | Why didn't qtask use postgresql instead?? |
Maarten 7-Jul-2008 [986] | Why is the world flat? |
Graham 7-Jul-2008 [987] | because of a limited viewpoint |
Maarten 7-Jul-2008 [988] | I agree, your viewpoint wasn't economics.... |
Graham 7-Jul-2008 [989] | With two open source databases to choose from of approximately similar functionality and stability, it is hard to understand why one would choose the one that has the restrictive license ... I can only imagine it is a mind share thing. |
Will 7-Jul-2008 [990] | James, thanks for your interest, I' ll upload it in a couple days 8) |
james_nak 7-Jul-2008 [991] | Thanks. |
Gabriele 8-Jul-2008 [992] | Why wouldn't Qtask want to talk to Postgres too if they had chosen it? |
Reichart 11-Jul-2008 [993] | Qtask might do this in the future... |
Graham 12-Jul-2008 [994x8] | Never used mysql before .. and just downloaded Nenad's driver. |
Getting this ... >> insert db "select * from patientrecord" == none >> result: copy db ** Script Error: Invalid argument: 0000-00-00 ** Where: convert-types ** Near: change at row 3 to >> | |
looks like some of the patient records have 0000-00-00 as the date of birth in them. | |
ok, this works round it insert db "select cast( birthdate as char) from patientrecord" | |
ummm.. how do you do a select on a field where the field name has a space in it? | |
Why would anyone put a space in a field name?? | |
docs say \_ is a space >> insert db "select middle\_name from patientrecord" ** User Error: ERROR 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve rsion for th... ** Near: insert db "select middle\_name from patientrecord" | |
ok, worked it out insert db "select `middle name` from patientrecord" | |
Dockimbel 13-Jul-2008 [1002] | MySQL driver v1.2.1 released. See more at http://softinnov.org |
Graham 13-Jul-2008 [1003] | Thanks for fixing the date zero error. |
Will 13-Jul-2008 [1004] | Thank you Dock! |
older newer | first last |