File tree Expand file tree Collapse file tree 7 files changed +67
-1
lines changed Expand file tree Collapse file tree 7 files changed +67
-1
lines changed Original file line number Diff line number Diff line change @@ -7105,3 +7105,14 @@ group by round((select 1 from t1 limit 1));
7105
7105
round((select 1 from t1 limit 1))
7106
7106
1
7107
7107
drop table t1;
7108
+ #
7109
+ # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
7110
+ #
7111
+ CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
7112
+ INSERT INTO t1 VALUES ('foo','bar');
7113
+ SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
7114
+ f1 f2
7115
+ SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
7116
+ f1 f2
7117
+ foo bar
7118
+ DROP TABLE t1;
Original file line number Diff line number Diff line change @@ -7102,6 +7102,17 @@ group by round((select 1 from t1 limit 1));
7102
7102
round((select 1 from t1 limit 1))
7103
7103
1
7104
7104
drop table t1;
7105
+ #
7106
+ # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
7107
+ #
7108
+ CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
7109
+ INSERT INTO t1 VALUES ('foo','bar');
7110
+ SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
7111
+ f1 f2
7112
+ SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
7113
+ f1 f2
7114
+ foo bar
7115
+ DROP TABLE t1;
7105
7116
set optimizer_switch=default;
7106
7117
select @@optimizer_switch like '%materialization=on%';
7107
7118
@@optimizer_switch like '%materialization=on%'
Original file line number Diff line number Diff line change @@ -7100,4 +7100,15 @@ group by round((select 1 from t1 limit 1));
7100
7100
round((select 1 from t1 limit 1))
7101
7101
1
7102
7102
drop table t1;
7103
+ #
7104
+ # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
7105
+ #
7106
+ CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
7107
+ INSERT INTO t1 VALUES ('foo','bar');
7108
+ SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
7109
+ f1 f2
7110
+ SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
7111
+ f1 f2
7112
+ foo bar
7113
+ DROP TABLE t1;
7103
7114
set @optimizer_switch_for_subselect_test=null;
Original file line number Diff line number Diff line change @@ -7111,6 +7111,17 @@ group by round((select 1 from t1 limit 1));
7111
7111
round((select 1 from t1 limit 1))
7112
7112
1
7113
7113
drop table t1;
7114
+ #
7115
+ # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
7116
+ #
7117
+ CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
7118
+ INSERT INTO t1 VALUES ('foo','bar');
7119
+ SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
7120
+ f1 f2
7121
+ SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
7122
+ f1 f2
7123
+ foo bar
7124
+ DROP TABLE t1;
7114
7125
set optimizer_switch=default;
7115
7126
select @@optimizer_switch like '%subquery_cache=on%';
7116
7127
@@optimizer_switch like '%subquery_cache=on%'
Original file line number Diff line number Diff line change @@ -7100,5 +7100,16 @@ group by round((select 1 from t1 limit 1));
7100
7100
round((select 1 from t1 limit 1))
7101
7101
1
7102
7102
drop table t1;
7103
+ #
7104
+ # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
7105
+ #
7106
+ CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
7107
+ INSERT INTO t1 VALUES ('foo','bar');
7108
+ SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
7109
+ f1 f2
7110
+ SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
7111
+ f1 f2
7112
+ foo bar
7113
+ DROP TABLE t1;
7103
7114
set @optimizer_switch_for_subselect_test=null;
7104
7115
set @join_cache_level_for_subselect_test=NULL;
Original file line number Diff line number Diff line change @@ -5988,3 +5988,13 @@ from t1
5988
5988
group by round((select 1 from t1 limit 1));
5989
5989
5990
5990
drop table t1;
5991
+
5992
+ --echo #
5993
+ --echo # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
5994
+ --echo #
5995
+
5996
+ CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
5997
+ INSERT INTO t1 VALUES ('foo','bar');
5998
+ SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
5999
+ SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
6000
+ DROP TABLE t1;
Original file line number Diff line number Diff line change @@ -1164,7 +1164,8 @@ Item *Item_cache::safe_charset_converter(CHARSET_INFO *tocs)
1164
1164
if (conv == example)
1165
1165
return this ;
1166
1166
Item_cache *cache;
1167
- if (!conv || !(cache= new Item_cache_str (conv)))
1167
+ if (!conv || conv->fix_fields (current_thd, (Item **) NULL ) ||
1168
+ !(cache= new Item_cache_str (conv)))
1168
1169
return NULL ; // Safe conversion is not possible, or OEM
1169
1170
cache->setup (conv);
1170
1171
cache->fixed = false ; // Make Item::fix_fields() happy
You can’t perform that action at this time.
0 commit comments