Commit 4300f502 authored by Alexander Barkov's avatar Alexander Barkov Committed by Sergei Golubchik

MDEV-26742 Assertion `field->type_handler() == this' failed in...

MDEV-26742 Assertion `field->type_handler() == this' failed in FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item

The bug was fixed in 10.5 using INET6 specific tests.

This bugs adds only UUID specific tests (no code changes).
parent b9f19f7e
#
# Start of 10.5 tests
# Start of 10.7 tests
#
#
# MDEV-4958 Adding datatype UUID
......@@ -179,5 +179,25 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 17 const 1 Using where; Using index
DROP TABLE t1;
#
# End of 10.5 tests
# MDEV-26742 Assertion `field->type_handler() == this' failed in FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item
#
CREATE TABLE t1 ( pk uuid, c text) engine=myisam;
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-000000000000',1);
CREATE TABLE t2 ( d text, KEY (d)) engine=innodb ;
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO t2 VALUES (2);
SELECT * FROM t2 JOIN t1 ON ( t1.pk > t2.d);
d pk c
Warnings:
Warning 1292 Incorrect uuid value: '2'
EXPLAIN SELECT * FROM t2 JOIN t1 ON ( t1.pk > t2.d);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
1 SIMPLE t2 ALL d NULL NULL NULL 1 Using where
UPDATE t2 JOIN t1 ON ( t1.pk > t2.d) SET t1.c = 1;
ERROR 22007: Incorrect uuid value: '2'
DROP TABLE t1, t2;
#
# End of 10.7 tests
#
--source include/have_innodb.inc
--echo #
--echo # Start of 10.5 tests
--echo # Start of 10.7 tests
--echo #
--echo #
......@@ -12,5 +12,20 @@ SET default_storage_engine=InnoDB;
--source type_uuid_engines.inc
--echo #
--echo # End of 10.5 tests
--echo # MDEV-26742 Assertion `field->type_handler() == this' failed in FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item
--echo #
CREATE TABLE t1 ( pk uuid, c text) engine=myisam;
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-000000000000',1);
CREATE TABLE t2 ( d text, KEY (d)) engine=innodb ;
INSERT INTO t2 VALUES (2);
SELECT * FROM t2 JOIN t1 ON ( t1.pk > t2.d);
EXPLAIN SELECT * FROM t2 JOIN t1 ON ( t1.pk > t2.d);
--error ER_TRUNCATED_WRONG_VALUE
UPDATE t2 JOIN t1 ON ( t1.pk > t2.d) SET t1.c = 1;
DROP TABLE t1, t2;
--echo #
--echo # End of 10.7 tests
--echo #
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