Description:
Run these queries:
CREATE TABLE t0 ( c35 INT , c19 INT ) ;
INSERT INTO t0 VALUES ( -76 , -114 ) , ( 99 , 0 ) ;
CREATE INDEX i0 ON t0 ( c19 ) ;
INSERT INTO t0 ( c35 ) VALUES ( -97 ) , ( 2 ) ;
SELECT t1 . c44 AS c52 FROM ( SELECT c35 AS c56 , c35 AS c2 , 120 AS c44 FROM t0 WHERE t0 . c35 NOT IN ( 59 , 124 , 36 ) GROUP BY c35 , c19 WITH ROLLUP HAVING t0 . c19 = TRIM( TRAILING c35 FROM -79 LIKE ROUND ( -98 , 47 ) OR RAND ( ) < -107 AND UPPER ( -97 ) LIKE 58.558450 ) IN ( SELECT c19 AS c1 FROM t0 ) INTERSECT SELECT c19 AS c47 , 74 AS c54 , -69 AS c57 FROM t0 ) AS t1 JOIN t0 ON t1 . c44 = CONVERT ( t1 . c2 , SIGNED ) ;
Will trigger assertion failure:
mysqld: /home/wx/mysql-8.0.34/sql/item_func.cc:1881: virtual longlong Item_typecast_signed::val_int(): Assertion `is_nullable()' failed.
GDB info:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6af2859 in __GI_abort () at abort.c:79
#2 0x00007ffff6af2729 in __assert_fail_base (fmt=0x7ffff6c88588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55555dfb4ca0 "is_nullable()", file=0x55555dfaa580 "/home/wx/mysql-8.0.34/sql/item_func.cc", line=1881, function=<optimized out>) at assert.c:92
#3 0x00007ffff6b03fd6 in __GI___assert_fail (assertion=assertion@entry=0x55555dfb4ca0 "is_nullable()", file=file@entry=0x55555dfaa580 "/home/wx/mysql-8.0.34/sql/item_func.cc", line=line@entry=1881, function=function@entry=0x55555dfb4c40 "virtual longlong Item_typecast_signed::val_int()") at assert.c:101
#4 0x0000555559d7b4ac in Item_typecast_signed::val_int (this=0x612000330f70) at /home/wx/mysql-8.0.34/sql/item_func.cc:1876
#5 0x0000555559c988ad in Arg_comparator::compare_int_signed (this=0x61500040b910) at /home/wx/mysql-8.0.34/sql/item_cmpfunc.cc:1838
#6 0x0000555559ccb597 in Arg_comparator::compare (this=<optimized out>) at /home/wx/mysql-8.0.34/sql/item_cmpfunc.h:210
#7 0x0000555559c95fa6 in Item_func_eq::val_int (this=<optimized out>) at /home/wx/mysql-8.0.34/sql/item_cmpfunc.cc:2424
#8 0x0000555559c36dab in Item::val_bool (this=0x61500040b830) at /home/wx/mysql-8.0.34/sql/item.cc:217
#9 0x0000555559cb92b6 in Item_cond_and::val_int (this=0x613000e07e70) at /home/wx/mysql-8.0.34/sql/item_cmpfunc.cc:5937
#10 0x000055555a293a03 in FilterIterator::Read (this=0x6070003a75e0) at /home/wx/mysql-8.0.34/sql/iterators/composite_iterators.cc:79
#11 0x000055555a29eefb in MaterializeIterator<DummyIteratorProfiler>::MaterializeQueryBlock (this=this@entry=0x6110001155f0, query_block=..., stored_rows=stored_rows@entry=0x7fffc706ba90) at /home/wx/mysql-8.0.34/sql/iterators/composite_iterators.cc:1170
#12 0x000055555a2a5500 in MaterializeIterator<DummyIteratorProfiler>::Init (this=0x6110001155f0) at /home/wx/mysql-8.0.34/sql/iterators/composite_iterators.cc:928
#13 0x000055555a2b1c37 in HashJoinIterator::Init (this=0x621000358530) at /home/wx/mysql-8.0.34/sql/iterators/hash_join_iterator.cc:182
#14 0x00005555597138da in Query_expression::ExecuteIteratorQuery (this=this@entry=0x6120002ec570, thd=thd@entry=0x6270002bf900) at /home/wx/mysql-8.0.34/sql/sql_union.cc:1763
#15 0x0000555559713ecd in Query_expression::execute (this=this@entry=0x6120002ec570, thd=thd@entry=0x6270002bf900) at /home/wx/mysql-8.0.34/sql/sql_union.cc:1823
#16 0x00005555595b1f79 in Sql_cmd_dml::execute_inner (this=0x60b0001584b0, thd=0x6270002bf900) at /home/wx/mysql-8.0.34/sql/sql_select.cc:1022
#17 0x00005555595ce209 in Sql_cmd_dml::execute (this=0x60b0001584b0, thd=0x6270002bf900) at /home/wx/mysql-8.0.34/sql/sql_select.cc:793
#18 0x00005555594bd568 in mysql_execute_command (thd=thd@entry=0x6270002bf900, first_level=first_level@entry=true) at /home/wx/mysql-8.0.34/sql/sql_parse.cc:4719
#19 0x00005555594c0bfe in dispatch_sql_command (thd=0x6270002bf900, parser_state=parser_state@entry=0x7fffc706ec00) at /home/wx/mysql-8.0.34/sql/sql_parse.cc:5368
#20 0x00005555594c38e2 in dispatch_command (thd=thd@entry=0x6270002bf900, com_data=com_data@entry=0x7fffc7070200, command=<optimized out>) at /home/wx/mysql-8.0.34/sql/sql_parse.cc:2054
#21 0x00005555594c7392 in do_command (thd=thd@entry=0x6270002bf900) at /home/wx/mysql-8.0.34/sql/sql_parse.cc:1439
#22 0x000055555989b7be in handle_connection (arg=arg@entry=0x603000163a80) at /home/wx/mysql-8.0.34/sql/conn_handler/connection_handler_per_thread.cc:302
#23 0x000055555cc724e9 in pfs_spawn_thread (arg=0x614000140a60) at /home/wx/mysql-8.0.34/storage/perfschema/pfs.cc:3042
#24 0x00007ffff7568609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#25 0x00007ffff6bef133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
How to repeat:
Run the queries above.