1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-08 17:02:21 +03:00
Files
mariadb/mysql-test/t
Alexander Nozdrin 75498ef924 Patch for Bug#12362125 (SP INOUT HANDLING IS BROKEN FOR TEXT TYPE).
Attempts to assign value to a table column from trigger by using
NEW.column_name pseudo-variable might result in garbled data.
That happened when:
  - the column had a BLOB-based type (e.g. TEXT)
    and
  - the value being assigned was retrieved from stored routine variable
    of the same type.

The problem was that BLOB values were not copied correctly in this
case. Instead of doing a copy of a real value, the value's representation
in record buffer was copied. This representation is essentially a
pointer to a buffer associated with the virtual table for routine
variables where the real value is stored. Since this buffer got
freed once trigger was left or could have changed its contents when
new value was assigned to corresponding routine variable such a shallow
copying resulted in garbled data in NEW.colum_name column.

It worked in 5.1 due to a subtle bug in create_virtual_tmp_table():
  - in 5.1 create_virtual_tmp_table() returned a table which
    had db_low_byte_first == false.
  - in 5.5 and up create_virtual_tmp_table() returns a table which
    has db_low_byte_first == true.
Actually, db_low_byte_first == false only for ISAM storage engine,
which was deprecated and removed in 5.0.

Having db_low_byte_first == false led to getting false in the
complex condition for the 2nd "if" in field_conv(), which in turn
led to copy-blob-behavior as a fall-back strategy:
  - to->table->s->db_low_byte_first was true (correct value)
  - from->table->s->db_low_byte_first was false (incorrect value)

In 5.5 and up that condition is true, which means blob-values are
not copied.
2011-05-09 12:29:23 +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-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-04-20 11:52:40 +04:00
2010-12-16 21:43:21 +03:00
2011-01-13 09:07:21 +01:00
2011-04-27 11:46:23 +04:00
2011-03-09 17:21:22 +02: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-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
2011-03-17 13:02:19 +02: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-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
2011-03-01 17:42:37 +03:00