Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When executing the query below with subquery cache enabled, mysqld asserts as follows:
mysqld: field.cc:3730: virtual longlong Field_long::val_int(): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.
backtrace:
#8 0x00897de8 in __assert_fail () from /lib/libc.so.6
#9 0x0824d8cb in Field_long::val_int (this=0xb5ea3e10) at field.cc:3730
#10 0x081bd969 in Item_field::val_int_result (this=0xb5ea3d78) at item.cc:2189
#11 0x081c7afd in Item_ref::val_int (this=0xb5e58e90) at item.cc:6447
#12 0x081c805c in Item_direct_ref::val_int (this=0xb5e58d48) at item.cc:6569
#13 0x0831dc3e in evaluate_join_record (join=0xb5e62e10, join_tab=0xb5ea3348, error=0) at sql_select.cc:13197
#14 0x0831d8af in sub_select (join=0xb5e62e10, join_tab=0xb5ea3348, end_of_records=false) at sql_select.cc:13103
#15 0x0831ccae in do_select (join=0xb5e62e10, fields=0xb5e67bb0, table=0x0, procedure=0x0) at sql_select.cc:12649
#16 0x083030cf in JOIN::exec (this=0xb5e62e10) at sql_select.cc:2355
#17 0x082352b1 in subselect_single_select_engine::exec (this=0xb5e2e8b0) at item_subselect.cc:2716
#18 0x0822f9e3 in Item_subselect::exec (this=0xb5e2e7f0) at item_subselect.cc:481
#19 0x082308cd in Item_singlerow_subselect::val_int (this=0xb5e2e7f0) at item_subselect.cc:918
#20 0x081cf2fc in Item::val_int_result (this=0xb5e2e7f0) at item.h:779
#21 0x081cb196 in Item_cache_int::cache_value (this=0xb5e68528) at item.cc:7712
#22 0x081d2f4c in Item_cache_wrapper::cache (this=0xb5e684c8) at item.cc:6725
#23 0x081c8812 in Item_cache_wrapper::val_int (this=0xb5e684c8) at item.cc:6779
#24 0x081cf2fc in Item::val_int_result (this=0xb5e684c8) at item.h:779
#25 0x083c2cbc in make_sortkey (param=0xb619ec18,
to=0xb5ea7f64 "\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"...,
ref_pos=0xb5e5b890 "\270P쵥\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"...) at filesort.cc:852
#26 0x083c2318 in find_all_keys (param=0xb619ec18, select=0x0, sort_keys=0xb5ea79e8, buffpek_pointers=0xb619ea50, tempfile=0xb619eb34, indexfile=0x0)
at filesort.cc:625
#27 0x083c0ed1 in filesort (thd=0xa617fd0, table=0xb5e5aa40, sortorder=0xb5ea4b68, s_length=1, select=0x0, max_rows=18446744073709551615,
sort_positions=false, examined_rows=0xb619ed80) at filesort.cc:246
#28 0x08324a74 in create_sort_index (thd=0xa617fd0, join=0xb5e5dfa0, order=0xb5e2f980, filesort_limit=18446744073709551615,
select_limit=18446744073709551615, is_order_by=true) at sql_select.cc:15849
#29 0x08302dd4 in JOIN::exec (this=0xb5e5dfa0) at sql_select.cc:2298
#30 0x08303802 in mysql_select (thd=0xa617fd0, rref_pointer_array=0xa619a44, tables=0xb5e2e920, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0,
group=0xb5e2f980, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb5e58a78, unit=0xa6196a8, select_lex=0xa619940) at sql_select.cc:2556
#31 0x082fbecf in handle_select (thd=0xa617fd0, lex=0xa61964c, result=0xb5e58a78, setup_tables_done_option=0) at sql_select.cc:276
#32 0x0829a5f0 in execute_sqlcom_select (thd=0xa617fd0, all_tables=0xb5e2e920) at sql_parse.cc:5081
#33 0x08290fd0 in mysql_execute_command (thd=0xa617fd0) at sql_parse.cc:2265
#34 0x0829c7d1 in mysql_parse (thd=0xa617fd0,
inBuf=0xb5e2d9b0 "/* cache is on */ SELECT SUM( DISTINCT table1 .`pk` ) , (\nSELECT MAX( `col_int_nokey` )\nFROM C\nWHERE table1 .`pk` ) field3\nFROM C table1\nJOIN (\nC table2\nJOIN CC table3\nON table3 .`col_varchar_k"..., length=311, found_semicolon=0xb61a0230) at sql_parse.cc:6027
#35 0x0828ea02 in dispatch_command (command=COM_QUERY, thd=0xa617fd0,
packet=0xa630329 "/* cache is on */ SELECT SUM( DISTINCT table1 .`pk` ) , (\nSELECT MAX( `col_int_nokey` )\nFROM C\nWHERE table1 .`pk` ) field3\nFROM C table1\nJOIN (\nC table2\nJOIN CC table3\nON table3 .`col_varchar_k"..., packet_length=314) at sql_parse.cc:1184
#36 0x0828dea8 in do_command (thd=0xa617fd0) at sql_parse.cc:890
#37 0x0828b008 in handle_one_connection (arg=0xa617fd0) at sql_connect.cc:1153
#38 0x00a08919 in start_thread () from /lib/libpthread.so.0
#39 0x00951e5e in clone () from /lib/libc.so.6