summaryrefslogtreecommitdiff
path: root/mysql-test/main/ctype_uca_innodb.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2019-09-22 04:08:48 +0300
committerMichael Widenius <monty@mariadb.org>2019-09-22 04:08:48 +0300
commit1bbe8c5e0f6823acd4780d7563e8c02f8b4c5a01 (patch)
tree640662e33767ac08186f6b1a5cf95c77faf560e7 /mysql-test/main/ctype_uca_innodb.result
parentba7725dace48d403187eb2a418a2081703fe5c9d (diff)
downloadmariadb-git-1bbe8c5e0f6823acd4780d7563e8c02f8b4c5a01.tar.gz
Proper fix for disabling warnings in read_statistics_for_table().
MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value - Use dbug_tmp_use_all_columns() to mark that all fields can be used - Remove field->is_stat_field (not needed) - Remove extra arguments to Field::clone() that should not be there - Safety fix for Field::set_warning_truncated_wrong_value() to not crash if table is zero in production builds (We have got crashes several times here so better to be safe than sorry). - Threat wrong character string warnings identical to other field conversion warnings. This removes some warnings we before got from internal conversion errors. There is no good reason why a user would get an error in case of 'key_field='wrong-utf8-string' but not for 'field=wrong-utf8-string'. The old code could also easily give thousands of no-sence warnings for one single statement.
Diffstat (limited to 'mysql-test/main/ctype_uca_innodb.result')
-rw-r--r--mysql-test/main/ctype_uca_innodb.result31
1 files changed, 3 insertions, 28 deletions
diff --git a/mysql-test/main/ctype_uca_innodb.result b/mysql-test/main/ctype_uca_innodb.result
index bd6f3b8a21f..7c64f17190e 100644
--- a/mysql-test/main/ctype_uca_innodb.result
+++ b/mysql-test/main/ctype_uca_innodb.result
@@ -23,14 +23,13 @@ t1 CREATE TABLE `t1` (
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='admin๐Œ†';
ch
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
+EXPLAIN SELECT ch FROM t1 WHERE ch='admin๐Œ†';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin๐Œ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin๐Œ†';
ch
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -46,22 +45,14 @@ EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a๐Œ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a๐Œ†' ORDER BY ch;
ch
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a๐Œ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a๐Œ†b' ORDER BY ch;
ch
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a๐Œ†' ORDER BY ch;
ch
a
@@ -104,8 +95,6 @@ EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a๐Œ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a๐Œ†' ORDER BY ch;
ch
a
@@ -125,14 +114,10 @@ ab
az
aะ€
aึ€
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a๐Œ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a๐Œ†b' ORDER BY ch;
ch
a
@@ -152,8 +137,6 @@ ab
az
aะ€
aึ€
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a๐Œ†' ORDER BY ch;
ch
z
@@ -164,24 +147,16 @@ EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a๐Œ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a๐Œ†' ORDER BY ch;
ch
z
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a๐Œ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a๐Œ†b' ORDER BY ch;
ch
z
-Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
ALTER TABLE t1 DROP KEY ch;
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');