summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2021-10-25 14:36:49 +0400
committerSergei Golubchik <serg@mariadb.org>2021-10-29 18:29:02 +0200
commit4300f50243f0c15766d39bf848374b6d44a7ef34 (patch)
tree27ebf4b8e56b9d1a15e9cc544f91319c4fc909b6 /plugin
parentb9f19f7eae960b6ebf769a3d0c63045ed5f2ce6c (diff)
downloadmariadb-git-4300f50243f0c15766d39bf848374b6d44a7ef34.tar.gz
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).
Diffstat (limited to 'plugin')
-rw-r--r--plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.result24
-rw-r--r--plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.test19
2 files changed, 39 insertions, 4 deletions
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.result b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.result
index a23fb1865a4..f777723eefc 100644
--- a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.result
+++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.result
@@ -1,5 +1,5 @@
#
-# 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
#
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.test b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.test
index 062e25d366b..941a7a73d9a 100644
--- a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.test
+++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_innodb.test
@@ -1,7 +1,7 @@
--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 #