Commit 27235eed authored by Sergei Golubchik's avatar Sergei Golubchik

Revert "MDEV-16768: fix blob key length"

This reverts commit 87609324

RocksDB was making invalid assumption about Field_blob::make_sort_key,
and the commit 87609324 changed Field_blob::make_sort_key to match
RocksDB assumptions.

It also unintentionaly broke sys_vars.max_sort_length_func
parent bc7d40d0
......@@ -8546,9 +8546,7 @@ void Field_blob::sort_string(uchar *to,uint length)
Store length of blob last in blob to shorter blobs before longer blobs
*/
length-= packlength;
uint key_length = MY_MIN(buf.length(), length);
store_bigendian(key_length, to + length, packlength);
store_bigendian(buf.length(), to + length, packlength);
}
#ifdef DBUG_ASSERT_EXISTS
......
include/master-slave.inc
[connection master]
CREATE TABLE t1 (b BLOB, i INT, KEY(b(8))) ENGINE=RocksDB;
INSERT INTO t1 VALUES (REPEAT('a',9),1);
UPDATE t1 SET i = 2;
connection slave;
connection master;
DROP TABLE t1;
include/rpl_end.inc
--source include/have_rocksdb.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
CREATE TABLE t1 (b BLOB, i INT, KEY(b(8))) ENGINE=RocksDB;
INSERT INTO t1 VALUES (REPEAT('a',9),1);
UPDATE t1 SET i = 2;
--sync_slave_with_master
# Cleanup
--connection master
DROP TABLE t1;
--source include/rpl_end.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment