1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-07 17:42:39 +03:00
Files
mariadb/mysql-test/t
Alexander Nozdrin 1c81015296 Patch for Bug 12652769 - 61470: CASE OPERATOR IN STORED ROUTINE RETAINS
OLD VALUE OF INPUT PARAMETER.

The user-visible problem was that CASE-control-flow function
(not CASE-statement) misbehaved in stored routines under some
circumstances. The problem resulted in a crash or wrong data
returned. The error happened when expressions in CASE-function
were not of the same character set.

A CASE-function should return values of the same character set
for all branches. Internally, that means a new Item-instance
for the CONVERT(... USING <some charset>)-function is added
to the item tree when needed. The problem was that such changes
were not properly recorded using THD::change_item_tree(),
thus dangling pointers remain in the item tree after
THD::rollback_item_tree_changes(), which lead to undefined
behavior (i.e. crash / wrong data) for subsequent executions of
the stored routine.

This bug was introduced by a patch for Bug 11753363
(44793 - CHARACTER SETS: CASE CLAUSE, UCS2 OR UTF32, FAILURE).

The fixed function is Item_func_case::fix_length_and_dec().
New CONVERT-items are added in agg_item_set_converter(),
which calls THD::change_item_tree().

The problem was that an intermediate array was passed
to agg_item_set_converter(). Thus, THD::change_item_tree() there
was called on intermediate objects.

Note: those intermediate objects are allocated on THD's
memory root, so it's Ok to put them into "changed item lists".

The fix is to track changes on the correct objects.
2011-06-21 19:24:44 +04:00
..
2011-03-03 12:12:32 +03:00
2010-02-25 23:13:11 +04:00
2011-03-15 16:56:11 +02:00
2011-01-25 12:14:28 +05:30
2011-02-17 12:53:09 +01:00
2011-02-17 12:53:09 +01:00
2011-01-17 15:26:13 +03:00
2011-03-03 18:46:30 +03:00
2011-03-03 18:46:30 +03:00
2011-05-05 08:13:22 +02:00
2011-03-07 10:08:10 +01:00
2010-11-26 16:32:51 +02:00
2011-04-14 13:10:11 +04:00
2010-04-13 19:04:45 +04:00
2011-03-03 15:27:36 +03:00
2010-04-13 19:04:45 +04:00
2011-04-12 14:13:15 +04:00
2011-05-26 14:09:25 +04:00
2010-12-16 21:43:21 +03:00
2011-01-13 09:07:21 +01:00
2011-05-18 10:59:04 +04:00
2011-03-09 16:04:50 +02:00
2011-02-18 11:55:24 +01:00
2010-06-11 10:15:55 +02:00
2010-01-15 15:42:15 +04:00
2010-01-15 15:42:15 +04:00
2011-01-04 18:46:01 +01:00
2011-01-14 19:21:27 +01:00
2011-04-26 11:52:58 +02:00
2011-03-29 10:09:05 +02:00
2010-04-20 10:51:50 +02:00
2010-08-25 13:17:15 +05:00
2010-07-16 21:25:00 +03:00
2011-03-08 09:41:57 +01:00
2011-02-08 11:21:14 +01:00
2011-01-11 15:15:25 +01:00
2010-04-13 19:04:45 +04:00
2010-11-15 23:31:04 +01:00
2011-04-27 18:42:05 +02:00
2010-09-13 15:56:56 +02:00
2011-01-10 16:13:12 +01:00
2011-03-09 18:41:16 +01:00
2010-02-24 00:22:19 -07:00
2010-10-20 16:56:09 +02:00
2010-10-20 16:56:09 +02:00
2010-10-20 16:56:09 +02:00
2009-12-29 15:19:05 +03:00
2010-02-06 13:28:06 +03:00
2010-07-04 20:35:05 +01:00
2010-04-13 19:04:45 +04:00
2010-04-13 19:04:45 +04:00
2010-04-13 19:04:45 +04:00
2010-04-13 19:04:45 +04:00
2010-04-13 19:04:45 +04:00
2011-01-14 09:36:24 +01:00
2011-01-14 09:36:24 +01:00
2011-01-12 10:31:41 +01:00
2011-01-31 15:04:39 +05:30
2011-01-19 15:12:43 +01:00
2011-03-28 13:57:54 +03:00
2011-04-14 10:13:28 +02:00