Alexander Nozdrin
3fa437cf40
Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIME
...
structure buffer).
This is a follow-up for WL#4435. The bug actually existed not only
MYSQL_TYPE_DATETIME type. The problem was that Item_param::set_value()
was written in an assumption that it's working with expressions, i.e.
with basic data types.
There are two different quick fixes here:
a) Change Item_param::make_field() -- remove setting of
Send_field::length, Send_field::charsetnr, Send_field::flags and
Send_field::type.
That would lead to marshalling all data using basic types to the client
(MYSQL_TYPE_LONGLONG, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_STRING and
MYSQL_TYPE_NEWDECIMAL). In particular, that means, DATETIME would be
sent as MYSQL_TYPE_STRING, TINYINT -- as MYSQL_TYPE_LONGLONG, etc.
That could be Ok for the client, because the client library does
reverse conversion automatically (the client program would see DATETIME
as MYSQL_TIME object). However, there is a problem with metadata --
the metadata would be wrong (misleading): it would say that DATETIME is
marshaled as MYSQL_TYPE_DATETIME, not as MYSQL_TYPE_STRING.
b) Set Item_param::param_type properly to actual underlying field type.
That would lead to double conversion inside the server: for example,
MYSQL_TIME-object would be converted into STRING-object
(in Item_param::set_value()), and then converted back to MYSQL_TIME-object
(in Item_param::send()).
The data however would be marshalled more properly, and also metadata would
be correct.
This patch implements b).
There is also a possibility to avoid double conversion either by clonning
the data field, or by storing a reference to it and using it on Item::send()
time. That requires more work and might be done later.
2010-11-13 18:05:02 +03:00
..
2010-08-12 19:19:57 +04:00
2010-10-08 00:34:59 +01:00
2009-10-15 17:23:43 +05:00
2010-08-16 14:50:27 +02:00
2010-08-09 11:32:50 +03:00
2010-09-20 17:17:32 +03:00
2009-09-23 23:32:31 +02:00
2010-08-18 13:29:04 +02:00
2010-08-16 14:53:30 +02:00
2010-07-08 18:20:08 -03:00
2010-03-19 11:06:40 +02:00
2010-09-02 23:37:04 +05:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-27 14:25:53 +04:00
2010-03-31 16:05:33 +02:00
2010-08-13 10:02:37 +02:00
2010-07-27 14:25:53 +04:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-15 10:47:50 -03:00
2010-03-31 16:05:33 +02:00
2010-08-26 12:01:43 +02:00
2010-08-26 12:01:43 +02:00
2010-07-23 17:17:55 -03:00
2010-10-29 11:35:07 +02:00
2010-10-06 19:20:18 +02:00
2010-07-23 17:17:55 -03:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-25 19:30:18 +02:00
2010-03-31 16:05:33 +02:00
2010-07-08 18:20:08 -03:00
2010-09-20 17:17:32 +03:00
2010-08-09 22:33:47 +04:00
2010-08-14 13:11:33 +04:00
2010-03-31 16:05:33 +02:00
2009-09-23 23:32:31 +02:00
2010-10-19 20:51:34 -02:00
2010-05-24 14:51:59 +02:00
2010-10-06 11:34:28 -03:00
2010-10-28 12:08:09 +02:00
2010-10-18 13:27:52 +02:00
2010-10-06 11:34:28 -03:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-23 17:17:55 -03:00
2010-03-31 16:05:33 +02:00
2010-05-28 19:53:26 -03:00
2010-03-31 16:05:33 +02:00
2010-07-30 16:56:57 +03:00
2010-10-06 16:15:59 +04:00
2010-07-23 17:16:29 -03:00
2010-07-02 16:38:04 -03:00
2010-03-31 16:05:33 +02:00
2010-11-10 11:58:50 +06:00
2010-08-13 14:20:49 +03:00
2010-07-23 17:13:36 -03:00
2010-09-09 16:43:45 +04:00
2010-03-31 16:05:33 +02:00
2010-03-20 23:23:42 +03:00
2010-10-08 11:52:09 +02:00
2010-08-20 15:14:11 +04:00
2010-10-06 13:02:11 +03:00
2010-07-23 17:16:29 -03:00
2010-08-30 11:36:04 +04:00
2010-08-30 11:36:04 +04:00
2010-10-07 12:17:08 +04:00
2010-11-01 02:23:37 +03:00
2010-03-31 16:05:33 +02:00
2009-09-23 23:32:31 +02:00
2010-11-13 18:05:02 +03:00
2010-08-19 15:55:35 +04:00
2010-10-19 20:51:34 -02:00
2010-03-31 16:05:33 +02:00
2010-07-08 18:20:08 -03:00
2010-03-31 16:05:33 +02:00
2010-08-09 11:32:50 +03:00
2010-10-20 16:21:40 -02:00
2010-08-13 13:51:48 +04:00
2010-07-15 10:47:50 -03:00
2010-10-23 21:09:27 +08:00
2010-10-19 20:51:34 -02:00
2010-10-20 17:02:59 -02:00
2010-09-29 17:26:32 +03:00
2009-12-11 15:51:39 +01:00
2010-11-09 12:45:13 -02:00
2010-09-30 17:29:12 +04:00
2010-09-30 17:29:12 +04:00
2009-09-23 23:32:31 +02:00
2008-10-23 15:28:53 +02:00
2008-10-23 15:28:53 +02:00
2010-03-31 16:05:33 +02:00
2008-10-23 15:28:53 +02:00
2010-07-09 09:28:51 -03:00
2010-10-19 20:51:34 -02:00
2009-09-23 23:32:31 +02:00
2010-11-09 13:59:33 -02:00
2010-11-05 14:16:27 +01:00
2010-09-16 17:38:13 +07:00
2010-07-23 17:09:27 -03:00
2009-09-23 23:32:31 +02:00
2010-09-16 16:20:35 +04:00
2010-07-19 11:21:24 +02:00
2010-06-11 10:15:55 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-10-01 15:30:16 +02:00
2010-08-30 17:33:55 +02:00
2010-08-09 11:32:50 +03:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-08-09 11:32:50 +03:00
2010-08-09 11:32:50 +03:00
2010-07-08 18:20:08 -03:00
2010-06-23 00:32:29 +04:00
2010-10-11 15:50:14 +01:00
2010-10-11 15:50:14 +01:00
2010-03-31 16:05:33 +02:00
2008-12-29 17:04:10 +01:00
2010-07-08 18:20:08 -03:00
2010-04-12 17:17:37 +04:00
2010-11-04 13:29:16 +08:00
2010-03-31 16:05:33 +02:00
2010-07-08 18:20:08 -03:00
2010-03-31 16:05:33 +02:00
2010-07-15 10:47:50 -03:00
2010-05-24 17:43:27 +01:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-10-06 19:20:18 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-27 14:25:53 +04:00
2010-10-13 11:08:39 +01:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-15 10:47:50 -03:00
2010-05-31 12:29:54 -03:00
2010-06-15 09:44:26 +02:00
2010-10-08 14:44:57 +02:00
2010-10-20 16:21:40 -02:00
2010-09-09 09:37:09 -03:00
2010-04-13 19:04:45 +04:00
2010-10-16 22:20:35 +08:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-11-11 11:06:16 +06:00
2010-10-26 15:48:08 +04:00
2010-07-08 18:20:08 -03:00
2010-07-30 19:28:36 +04:00
2010-07-30 19:28:36 +04:00
2010-11-13 18:05:02 +03:00
2010-10-21 15:41:13 +07:00
2010-10-07 20:01:17 +04:00
2010-09-06 17:04:32 +02:00
2010-07-14 16:39:40 -03:00
2010-11-02 17:45:26 +02:00
2010-08-09 11:32:50 +03:00
2010-09-22 10:15:41 +02:00
2010-08-16 16:25:23 +02:00
2010-08-31 13:59:51 +04:00
2010-08-16 16:25:23 +02:00
2010-07-09 09:28:51 -03:00
2010-03-31 16:05:33 +02:00
2009-09-23 23:32:31 +02:00
2010-08-20 13:58:28 +04:00
2010-09-20 17:17:32 +03:00
2010-10-14 20:56:56 +04:00
2010-09-30 17:29:12 +04:00
2010-07-15 10:47:50 -03:00
2010-03-31 16:05:33 +02:00
2010-07-15 08:13:30 -03:00
2010-08-09 11:32:50 +03:00
2010-10-12 14:07:13 +04:00
2010-04-12 17:17:37 +04:00
2010-06-07 16:01:39 +02:00
2010-10-23 21:09:27 +08:00
2010-10-23 21:09:27 +08:00
2010-03-31 16:05:33 +02:00
2010-09-20 17:17:32 +03:00
2010-09-20 17:17:32 +03:00
2010-05-28 19:13:31 -03:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-07-29 16:32:11 +04:00
2010-07-27 16:42:36 +04:00
2010-10-19 12:27:09 +02:00
2010-07-01 15:53:46 +02:00
2010-10-04 10:25:04 +02:00
2010-06-17 17:31:51 +04:00
2010-06-10 22:30:49 -03:00
2010-04-12 17:17:37 +04:00
2010-07-27 14:25:53 +04:00
2010-03-31 16:05:33 +02:00
2010-07-30 19:28:36 +04:00
2010-07-30 19:28:36 +04:00
2010-08-12 17:50:23 +04:00
2010-06-09 12:39:09 +04:00
2010-10-20 17:02:59 -02:00
2010-03-31 16:05:33 +02:00
2010-07-01 19:48:56 +04:00
2010-10-07 12:01:51 +02:00
2010-03-31 16:05:33 +02:00
2010-10-05 17:22:30 +03:00
2010-10-25 17:08:27 +02:00
2010-03-31 16:05:33 +02:00
2010-07-15 10:47:50 -03:00
2010-10-02 00:12:27 +04:00
2010-03-31 16:05:33 +02:00
2010-07-08 18:20:08 -03:00
2010-03-31 16:05:33 +02:00
2010-07-08 18:20:08 -03:00
2010-03-31 16:05:33 +02:00
2010-10-23 21:09:27 +08:00
2010-08-31 13:59:51 +04:00
2010-10-28 12:08:09 +02:00
2010-10-06 11:34:28 -03:00
2010-11-05 14:16:27 +01:00
2010-10-01 13:22:11 +02:00
2010-06-07 17:40:52 +04:00
2010-06-07 16:01:39 +02:00
2010-11-04 11:00:59 +01:00
2010-09-27 16:55:09 +04:00
2010-11-13 18:05:02 +03:00
2009-10-22 00:02:06 +04:00
2010-07-27 18:32:42 +04:00
2010-07-08 18:20:08 -03:00
2010-07-08 18:20:08 -03:00
2010-09-09 18:29:14 +04:00
2010-08-13 13:51:48 +04:00
2010-11-08 00:06:22 +06:00
2010-03-31 16:05:33 +02:00
2010-09-06 18:18:44 +01:00
2010-03-31 16:05:33 +02:00
2010-11-01 02:23:37 +03:00
2010-08-26 14:17:27 +04:00
2010-08-12 20:44:41 +04:00
2010-03-31 16:05:33 +02:00
2010-11-02 16:02:16 +02:00
2010-10-13 12:48:08 +04:00
2010-07-30 19:28:36 +04:00
2009-09-10 03:18:29 -06:00
2010-03-31 16:05:33 +02:00
2010-08-25 19:57:53 +04:00
2010-10-19 20:51:34 -02:00
2010-11-10 14:32:42 +06:00
2010-08-20 19:15:48 +02:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-08-04 20:29:13 +04:00
2010-05-31 12:29:54 -03:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-09-30 12:43:43 +02:00
2010-09-16 11:11:13 +02:00
2010-10-06 11:34:28 -03:00
2010-10-06 11:34:28 -03:00
2010-07-27 14:25:53 +04:00
2009-09-23 23:32:31 +02:00
2010-11-10 15:48:29 +01:00
2010-03-31 16:05:33 +02:00
2010-10-07 12:01:51 +02:00
2010-10-07 12:01:51 +02:00
2010-08-18 13:55:37 +02:00
2010-05-25 17:01:38 -03:00
2010-11-03 14:51:52 +00:00
2010-03-31 16:05:33 +02:00
2010-03-31 16:05:33 +02:00
2010-08-09 11:32:50 +03:00
2010-03-31 16:05:33 +02:00
2010-10-08 14:22:22 +02:00
2010-10-07 21:53:00 -03:00
2010-10-04 15:42:16 +03:00
2010-10-06 11:34:28 -03:00
2010-06-11 17:48:24 +04:00
2010-05-28 19:13:31 -03:00
2010-09-13 13:31:22 +02:00
2009-12-03 21:37:38 +03:00
2009-09-23 23:32:31 +02:00
2010-08-15 11:56:14 +04:00
2010-03-31 16:05:33 +02:00
2010-07-29 16:32:11 +04:00
2010-07-08 18:20:08 -03:00
2010-07-08 18:20:08 -03:00
2010-07-02 16:38:04 -03:00