mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
BUG#34289 - Incorrect NAME_CONST substitution in stored procedures
breaks replication NAME_CONST() didn't replicate constant character set and collation correctly. With this fix NAME_CONST() inherits collation from the value argument.
This commit is contained in:
@@ -225,4 +225,7 @@ select min(a) from t1 group by inet_ntoa(a);
|
|||||||
min(a)
|
min(a)
|
||||||
-2
|
-2
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
|
||||||
|
NAME_CONST('var', 'value') COLLATE latin1_general_cs
|
||||||
|
value
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
@@ -237,5 +237,11 @@ insert into t1 values (-1), (-2);
|
|||||||
select min(a) from t1 group by inet_ntoa(a);
|
select min(a) from t1 group by inet_ntoa(a);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#34289 - Incorrect NAME_CONST substitution in stored procedures breaks
|
||||||
|
# replication
|
||||||
|
#
|
||||||
|
SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
|
@@ -1240,6 +1240,7 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
|
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
|
||||||
|
collation.set(value_item->collation.collation, DERIVATION_IMPLICIT);
|
||||||
max_length= value_item->max_length;
|
max_length= value_item->max_length;
|
||||||
decimals= value_item->decimals;
|
decimals= value_item->decimals;
|
||||||
fixed= 1;
|
fixed= 1;
|
||||||
|
Reference in New Issue
Block a user