Hi,

I'm working on an event-driven mysql library in perl, and for that was
busy doing several low level tests, and I noticed the following:

If I send a CREATE_DB for a database that doesn't exist yet I get
something like this in strace:

write(5, "\4\0\0\0\5foo", 8)            = 8
read(5, "\3\0\0\1\0\1\0", 8192)         = 7

So you see it send a request to create foo, and it gets back an OK.

However, if I do it again:
write(5, "\4\0\0\0\5foo", 8)            = 8

Now there is no response. I expected to get an error, like I would if 
I did the create using a QUERY:

write(5, "\24\0\0\0\3create database foo", 24) = 24
read(5, "/\0\0\1\377\357\3Can\'t create database \'foo\'. Database exists", 8192) = 51

No response is a bug, right ? This way my client looses sync between
questions and answers. Nor do I see a sane way to handle this
(using timeouts isn't sane, sending some followup query just to delimit the
result isn't sane either).

The same thing happens with DROP_DB. All other valid client protocol
messages that can error at all will properly send back an error.

I suppose by the way that these messages are deprecated nowadays and you
should do anything that you *can* do using a QUERY with a QUERY ?
-- 
A Freudian slip is when you say one thing but mean your mother.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to