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

World: r3wp

[MySQL]

Dockimbel
25-Jan-2006
[601]
I agree, I never use this approach when I design a new protocol. 
It leads to error and it's harder to handle on the receiver side 
because you don't know how much data you're waiting for.
Pekr
25-Jan-2006
[602]
So v 1.0 will have to live with those occassional errors? If so, 
we should go for 1.0 and claim it is a feature, not a bug :-)
Dockimbel
25-Jan-2006
[603x2]
v1.0.3 uploaded. That's my new candidate for 1.0. The connection 
process is now rock solid! I've stressed it with 20,000 connections 
without troubles. The protocol flaw for password is now silently 
handled by the driver by reconnecting to the server.
With v3.x.y servers, there's still sometimes connections errors 1045 
that shouldn't happen. I guess that's related to some encryption 
implementation difference between my client and v3 servers. Workaround 
for this, is catching error! values when connecting and retrying 
the connection if the user/pass is fixed and should be able to connect 
to the server (proper right set in 'mysql' tables).
Pekr
6-Feb-2006
[605x2]
There is one email on ml, reporting still having problems with latest 
version - his name is Alain Goye, and he says that his error is not 
random, but deterministic, dunno what he means, Anton trying to find 
out more info ...
Doc, one forgotten probe probably ... go look into do-handshake function 
and the part where you send-packet port probe rejoin [] ... the probe 
should not be there probably ...
Dockimbel
6-Feb-2006
[607x2]
Uploaded the last version without the "probe". :-)
Tried to reproduce Alain's problem without success. I've even created 
new users with server v4.1-16 and can log in without any error.
Maxim
21-Feb-2006
[609]
hi guys, does the latest driver work with MySQL v5.0, or are there 
any known issues?
Pekr
22-Feb-2006
[610]
the do work - tested with 5.0.18 here,, but only sporadically, not 
heavy-tested ....
Ammon
22-Feb-2006
[611]
Apparently MySQL 5 has a datatype that isn't defined in the protocol, 
adding this line seems to work just fine:

defs/types 246 decimal
Dockimbel
25-Feb-2006
[612]
Thanks Ammon, I'll add it for the 1.0 release.
Henrik
5-Mar-2006
[613x3]
I get a strange bug where I, every time I do a query, some old data 
is sent back to me
with 1.0.3 and MySQL 5.x.x
actually it happens every time I try to query an empty table
Anton
6-Mar-2006
[616]
This sounds just like the issue we were talking about in SQLite group. 
You probably need to copy the results and maybe also clear the strings 
returned by the query.
Henrik
10-Mar-2006
[617]
I'm not sure how to do that... I 'insert a query to a port and 'copy 
the result back out from that port... I can't control that, can I?
Anton
11-Mar-2006
[618x2]
So if your code looks like this:
	insert port sql-query
	result: copy port
What does result contain ?
(I suspect we are talking about COPY in different places. I don't 
mean the COPY from the port.)
Henrik
11-Mar-2006
[620]
fixed it! I'm not sure exactly how it works, because I do really 
copy the value to 'result like you describe, but the variable is 
local to a function. a CLEAR RESULT after RESULT: COPY PORT solved 
it

thanks for the tip :-)
Anton
11-Mar-2006
[621x3]
Great !  but... you haven't told me what result contains. Is it a 
string ?
Ahh... also show me what the function looks like. Is it like this:
	func [
		/local result
	][
		insert port sql-query
		result: copy port
	]
Remember that COPY actually calls the COPY function in the scheme 
handler. (probably, I haven't looked at MySQL scheme).
Therefore maybe what you want is actually:

	result: copy copy port


The theory being that the first COPY provides you with the result 
string from inside the scheme handler (but the scheme still hangs 
on to it), and the second COPY works as usual in rebol (actually 
makes a copy).
Dockimbel
11-Mar-2006
[624]
Couldn't reproduce the bug...When an empty set is returned, the driver 
returns an literal empty block! value. This shouldn't be an issue 
as long as you don't modify the returned value. Anyway to avoid such 
side effect, the driver now return a fresh new block!.
Henrik
11-Mar-2006
[625]
dockimbel: I think it only returned an incorrect block after doing 
an SQL insert operation. when doing normal select queries it would 
return an empty block! where it should, but after using SQL insert, 
empty blocks contained old values
Dockimbel
11-Mar-2006
[626x2]
I tried several tests, but it works well, no issue :
>> insert db "insert into regions values ('556', 'test')"
== none
>> insert db "select * from empty"
== none
>> probe copy db
[]
Henrik
11-Mar-2006
[628]
which mysql version? I've only seen it on 4.1 and up
Dockimbel
11-Mar-2006
[629]
4.0.16
Henrik
11-Mar-2006
[630]
the copy copy thing fixes it for 5.0, it seems
Dockimbel
11-Mar-2006
[631x2]
Ok, will try to reproduce that with a 5+ version
Just tried with v5.0.19, no problem :
Henrik
11-Mar-2006
[633]
is that with the fix?
Dockimbel
11-Mar-2006
[634]
>> db: open mysql://[root-:-localhost]/test
>> insert db "insert into regions values ('557', 'test')"
== none
>> insert db "select * from empty"
Yes, let me try without it
Henrik
11-Mar-2006
[635]
maybe it needs to get "dirty" with a few selects first... I don't 
know
Dockimbel
11-Mar-2006
[636x3]
Tried with several SELECT clauses, tried using partial reading with 
copy/part, still no problem...
With or without using a fresh block! value for empty set
Do you have a small example that doesn't work for you ?
Henrik
11-Mar-2006
[639]
I'll see if I can figure something out...
Henrik
13-Mar-2006
[640]
sorry, I can't make a simple example right now. no time. :-(
PeterWood
29-Mar-2006
[641x3]
I'm getting the Error 1043 Bad Handshake problem accessing My-SQL 
5.0.18 on Windows/XP using mysql-protocol.r via  localhost: that 
Alain Goyé reported on the mailing list:

>> db: open mysql://root:?@localhost/fundamentals
Password: *********
connecting to: localhost
>> insert db "SELECT * FROM books"
** User Error: ERROR 1043 : Bad handshake
** Near: insert db "SELECT * FROM books"

It works fine from another machine over the LAN.
Any pointers on how to overcome this?
Sorry, it's a password related problem that I can duplicate remotely. 
Further investigation needed.
yeksoon
29-Mar-2006
[644]
try changing the  Privileges to 'No password' for the user and see 
if the error still exists?
PeterWood
29-Mar-2006
[645x2]
Works fine .
I've just realised that I' have old_passwords set on and am using 
the latest version of Mysql-protocol.r :-(
Pekr
29-Mar-2006
[647x3]
it should work too though ...
it should distinguish, if the password is old or new style ....
but not sure, maybe Doc removed the "old" functionality, although 
I doubt it ...
PeterWood
29-Mar-2006
[650]
I solved the problem by installing the 0.99 version of mysql-protocol.r. 
It was quicker than trying to get XAMPP to accept a MySQL revised 
configuration file.