From 5e051bfa15d201228b103d7f536436a61cde8707 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 21 Dec 2016 15:39:45 +0400 Subject: MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) The patch b96c196f1cd5d77e524cbf952539bdd33c65ffc1 added a new call for safe_charset_converter() without a corresponding fix_fields(). In case of a sub-query the created Item remained in non-fixed state. The problem did not show up with literal derived expressions, only subselects were affected. This patch adds a corresponding fix_fields() to the previously added safe_charset_converter(). --- mysql-test/t/subselect.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/t/subselect.test') diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 77b6c6c5582..a8ad3ba52a5 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -5988,3 +5988,13 @@ from t1 group by round((select 1 from t1 limit 1)); drop table t1; + +--echo # +--echo # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +--echo # + +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +DROP TABLE t1; -- cgit v1.2.1