r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[MySQL]

Dockimbel
3-May-2005
[110x2]
You can try to disengage the auto-reconnect feature and test if the 
connection is still active by yourself (send a ping command for example).
db-port/locals/auto-ping?: off (stop pinging the server and don't 
reconnect automatically).
Oldes
6-May-2005
[112x2]
Henrik: I hit the same problem just at this moment:( unfortunatelly 
I don't know how to fix it
But I'm not sure if it's not problem of the MySQL itself (for example 
some way how to awoid attacks
Henrik
6-May-2005
[114]
I found a different solution: manually check if the connection has 
timed out 30 seconds after a query and then reconnect. it's not perfect 
since I have to check at every query, but it works to the extent, 
I've tested it
Oldes
6-May-2005
[115]
how you do the timeout test?
Henrik
6-May-2005
[116]
after the query I store 'now. the next time I do a new query I check 
'now against the stored one. if the difference is more than 30 seconds, 
I close the db connection and open it again immediately
Oldes
10-May-2005
[117x2]
that would not solve my problem
my problem was that after about 30 queries it got to infinitive loop 
(low-level reads of length 0 bytes)
Dockimbel
10-May-2005
[119]
What's your server version ?
Oldes
15-May-2005
[120]
MySQL server version: 3.23.37
Tomc
26-May-2005
[121x3]
an atomic way of returning the value of an AUTO_INCREMENT column 
on insert  would be very nice.
i.e. 

insert db "insert  into tab(tab_id,tab_name) values(NULL,'alt_key')"
tab-id: copy db


would gaurentee to give you the correct tab_id   as it looks now 
you have to:


insert db "insert  into tab(tab_id,tab_name) values(NULL,'alt_key')"
;;; hope no one else is insertintginto the table right now
insert db  "select LAST_INSERT_ID()"
tab-id: copy db
even being able to issue more than one sql statement would help some

insert db {insert  into tab(tab_id,tab_name) values(NULL,'alt_key'); 
select LAST_INSERT_ID()}
tab-id: copy db
Gabriele
26-May-2005
[124x3]
Tom: the select above is actually safe. MySQL keeps the last insert 
id on a per-connection basis
this means, that even if someone else inserts a record between your 
two queries, you'll get the correct result.
each connection gets its own last insert id.
Tomc
26-May-2005
[127]
thanks Gab, that makes me feel better
François
7-Aug-2005
[128]
Hello, is there anyone working with Rebol Command and Mysql 4.1.x 
? It appears that the authentication protocol has changed and Rebol/Command 
can not connect to MySQL 4.1.x. But it works fine with MySql 4.0.x.
Pekr
7-Aug-2005
[129]
have you tried free mySQL driver from DocKimbel?
François
7-Aug-2005
[130]
I have heard that the driver from DocKimbel has the seem issue... 
But my point is that Rebol/Command should be updated to work with 
version 4.1 which is currently the recommended version for peoduction 
environment!
JaimeVargas
8-Aug-2005
[131x2]
Most probably driver support for db will be drop in future versions. 
(I recommend working with DocKimbel of helping improve his code).
(Disclaimer: This is my opiong not RT official position)
François
8-Aug-2005
[133]
If support for db is gone, what is the point for a professional version 
of rebol??
JaimeVargas
8-Aug-2005
[134]
It is going to become platform. You get access to a plugin API where 
you can plug-in 3rd db modules. (At leass the was the plan from DevCon'04). 
Don't know how things will change in the future. You can still request 
RT to upgrade the drivers.
Pekr
8-Aug-2005
[135x3]
What exactly is Platform going to be about?
Imo we should aim for REAL kernel - where all unnecessary things 
should be removed - I talk about fastcgi, db drivers etc.
I am not sure about protocol handlers either ... I start to not understand, 
what is rebol - it is not language, nor it is stand-alon platform 
... I want clean design ... Base + SDK is the answer imo ...
JaimeVargas
8-Aug-2005
[138]
Base == Platform imho
Pekr
8-Aug-2005
[139x2]
good then ...
so we should be able "to build" various variants upon our (developers) 
needs using SDK modules ...
François
9-Aug-2005
[141]
Ok, but who will develop those modules? Would they be open source? 
Personally, the reason why I love rebol is because it allows me to 
focus on the business, not on the tehnical aspect of a database, 
fastcgi, etc... I am certainly not the one who will develop technical 
modules, simply by lack of knowledge and time. But I really need 
those db access, fastcgi, etc...
JaimeVargas
9-Aug-2005
[142]
It could be RT, or they could come from 3rd parties.  I guess the 
answer is time will tell. You can certainly express your views and 
requests to RT, they may change direction based on customer input. 
However the directions is a bit blurry right now.
Pekr
19-Aug-2005
[143x2]
Is there any conclusion about DocKimbel's mySQL driver and 4.11 server 
release? Does it work or no? In terms of one project, where we exchange 
data, client agrees to our proposed way, only if we import data to 
their tables on their server. It is Debian linux, mySQL 4.11 or so, 
so before I produce some script and give it to them, I would like 
to ask if the problem of connection/authentication is resolved? Thanks 
a lot ....
Can I update particular fields (columns) in table?
Pekr
23-Aug-2005
[145x4]
Hmm, so noone uses mySQL here? :-)
I would have to try to download it, install and try it myself, uhm, 
another lost afternoon for testing simple thing :-)
the trouble is, I need to send rebol plus script to other site, so 
testing will be very tough .... hmm, maybe there is no other better 
way than to actually do so ....
btw - other site will use rebol plus mysql script in terms of Cron 
job - how should I launch it? I hope they know how to define Cron 
job, as I don't know ... should it be similar to CGI script? Or? 
Simply "cron script" calls something like \path\to\rebol\rebol \path\to\my-script\myscript.r? 
What arguments eventually? -s?
Henrik
23-Aug-2005
[149]
I think you can do that. cronjobs are normal scripts that are carried 
out. they reside in a table of cronjobs which basically is a shell 
script with some time and date information added
MikeL
23-Aug-2005
[150]
Hi Petr, 


Not sure if this is what you are asking about mySQL "Can I update 
particular fields (columns) in table?" but if you want to change 
a value you use SET.  e.g.  in mySQL protocol format


query: rejoin[{update logons set rs='}keyOrder{' where userName = 
'}cgi/userName{'}]
insert db reduce query
Pekr
23-Aug-2005
[151]
thanks, that shoudl do the job. I simply mean - your record structure 
has following fields for e.g. - Name, LastName, Age, Address1, Address2 
and I want to update only e.g. LastName and Address2 fields ....
Thorsten
28-Aug-2005
[152]
I have the new MySQL Version 5 Beta installed on my development Notebook 
(WinXP). I was devoloping a Script acessing a current Version 4.1 
of MySQL without any problems and i thought about continuing dev 
work at home. There i ran into an error saying that the autthetification 
protocol of the client is not supported and i should update my client, 
which is the mysql-protocol from DocKimble, when acessing the local 
version 5 Beta of MySQL. Is this a known problem and does anybody 
knows to work around this?? Does anybody know what changed to authenfication 
that is not supported by the protocol??
Graham
28-Aug-2005
[153x2]
this problem has been discussed before.
Guess someone will have to investigate this since dockimbel is busy 
on a contract ...
Thorsten
28-Aug-2005
[155]
Sorry,I tried to search for this topic but could not find a result. 
Perhaps i did not get back far enough. I'll see if i can find out 
something about it. Thanks for the Info.
MikeL
28-Aug-2005
[156]
Re: MySQL Auth.   IIRC  http://dev.mysql.com/doc/mysql/en/old-client.html
I think we used this option "Tell the server to use the older password 
hashing algorithm" and continued without a house call.  If that does 
not work, let me know and on Monday I will ask the programmer who 
did it what did work.
Thorsten
28-Aug-2005
[157]
I thought of that before and set the ol_password variable to on. 
But i think i forgot to change the passwords itself. I will try that 
out and let you know if it works. Thanks Mike
Pekr
29-Aug-2005
[158]
I would like to know the result guys, as I am about to create scripts 
for the partner site, and if I fail, bye bye rebol - the trouble 
simply is - they told us - if you want to sync data to us, prepare 
import utilities for us. So - I would still have to do the job, just 
using php or simply something else - which would be a big time loss, 
as I never used it before ....
Pekr
30-Aug-2005
[159]
I configured my database, then I run into above mentioned problems 
with non ability to use new authentication method. I choosed to use 
old one, but suddenly I can' connect even as a root ;-)