Hi Eric,
Eric Day wrote:
Hi Andrey,

On Thu, Oct 16, 2008 at 02:41:49PM +0200, Andrey Hristov wrote:
1) Missing sequence number from the packet header. This sequence number doesn't duplicate TCP functionality. During the development of the C library for PHP I discovered server bugs where the sequence number helped resolve them and was showing the client that there is something wrong. libdrizzle won't have access to the TCP sequence number. Let me show you an example of typical server bug:
COM_QUERY -> seq 1
ERROR -> seq 2
ERROR (this is the bug) -> seq 3

COM_QUERY -> seq 1

In this scenario you send 2 queries. The first generates an error, but because of a server bug it there is second error. This has happened and there is a potential to happen again. If there is no sequence numbering then the second query will read the second error, which wasn't generated by it and get confused, you will get out of sync. If the second query has generated a result set, the third query will read it's result.

Ahh, ok. I was under the assumption that the sequence number was
only there for proper ordering over network transports that did not
guarantee order (like UDP). In the case you point out, it seems the
right action to take is to actually xix the server bug generating
duplicate errors, and making sure only a single error packet is sent
(possibly with multiple errors included. I'd rather fix server bugs
than introduce mechanisms into the protocol that don't need to
be there.

MySQL doesn't support UDP.
Regarding, the sequence. I am not saying we should not fix server bugs, if they appear, but the idea is that with that one byte you can easily catch server bugs. In a real-world scenario you never want to receive wrong information from your server. The server can be slow, but should not return wrong information.

Best,
Andrey

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to