mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 10:57:54 +02:00
Bug #27123 (partition + on duplicate key update + varchar = Can't find
record in table) key_restore function didn't work as intended in the case of VARCHAR or BLOB fields, stored the restored key in field->ptr instead of to_record. That produced the wrong key so search returned wrong result mysql-test/r/partition.result: result added mysql-test/t/partition.test: testcase sql/field.cc: Field_blob::store_length made static sql/field.h: Field_blob::store_length and set_ptr functions implemented in slightly different way sql/ha_ndbcluster.cc: set_ptr_offset used sql/key.cc: set key_part->field->ptr to the proper place inside the to_record so the restored key will be placed there as key_restore is supposed to behave
This commit is contained in:
parent
cc76701e8f
commit
611456362f
6 changed files with 53 additions and 16 deletions
|
|
@ -6969,7 +6969,7 @@ Field_blob::Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
|
|||
}
|
||||
|
||||
|
||||
void Field_blob::store_length(uint32 number)
|
||||
void Field_blob::store_length(char *ptr, uint packlength, uint32 number)
|
||||
{
|
||||
switch (packlength) {
|
||||
case 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue