Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
10.2.0-2, 10.2.0-3, 10.2.0-4, 10.2.0-5, 10.2.0-8, 10.1.13
Description
Implement COM_MULTI protocol command. Just as COM_QUERY support multiple queries in one packet, COM_MULTI will bundle many COM_xxx commands in one packet.
May be the server should only support COM_MULTI if CLIENT_MULTI_RESULTS flag is set? Probably not
Packets included in one COM_MULTI probably do not need packet number as well as separate compression, so only 3 bytes of length for each.
For prepared statement to be able prepare / execute / deallocate the command in one COM_MULTI batch will be special prepared statement ID (0 or -1) which mean ID of previous command.
Packet structure:
- 4 or 7 bytes: of packet header (read by my_real_read())
- 1 byte: COM_MULTI
- 3 bytes: length of subcommand 1
- N1 bytes: subcommand1
- 3 bytes: length of subcommand 2
- N2 bytes: subcommand 2
... - 3 bytes: length of subcommand m
- Nm bytes: subcommand m
COM_MULTI should be numbered from the "end" i.e. 255
There should be capability flag for it.
Attachments
Issue Links
- blocks
-
MDEV-10169 Optimize INSERT for COM_MULTI batch
-
- Closed
-
I'll send you a dif also it can be reviewed on bb-sanja-10.2 on github, commits:
commit b92189b69d68a560240692d84155095607337ce5
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Fri Jan 8 12:55:34 2016 +0100
Check ability to accept multi-results.
commit 3704e74a38d74cd33e6889c81f0abcf8e4515ddb
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Thu Jan 7 19:06:38 2016 +0100
Last statement fix after talk to wlad.
commit 4474a9c0b5d657723bf01124c0689ad6de03fecf
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Thu Jan 7 16:00:02 2016 +0100
MDEV-9058: protocol: COM_MULTI command (part 3)Support of "previuousely used statement ID".
All IDs with highest bit ON reserved for special use.
commit 6c48449d90dc94bc58af0ef7adcf019a11014193
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Tue Jan 5 20:44:45 2016 +0100
MDEV-9058: protocol: COM_MULTI command (part 2)simple COM_MULTI support (no prepared statements chain yet).
commit b78a53f18337c1c457b99e0ddb2da709c289fab2
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Thu Nov 26 11:21:56 2015 +0100
MDEV-9058: protocol: COM_MULTI command (part 1)Adding a command from the end of avaliable commands numering space (255)