#7 0x00007f1dda2bc412 in __GI___assert_fail (assertion=assertion@entry=0x559b59c7ed21 "0", file=file@entry=0x559b59c5fb0e "/test/10.5_dbg/sql/item.cc", line=line@entry=9742, function=function@entry=0x559b59c5cca0 <stored_field_cmp_to_item(THD*, Field*, Item*)::__PRETTY_FUNCTION__> "int stored_field_cmp_to_item(THD*, Field*, Item*)") at assert.c:101
#8 0x0000559b5912aa6c in stored_field_cmp_to_item (thd=thd@entry=0x7f1dae415088, field=field@entry=0x7f1dae4520d8, item=0x7f1dae475010) at /test/10.5_dbg/sql/item.cc:9742
#9 0x0000559b591454b2 in convert_const_to_int (thd=thd@entry=0x7f1dae415088, field_item=field_item@entry=0x7f1dae474dc0, item=0x7f1dae475178) at /test/10.5_dbg/sql/item_cmpfunc.cc:353
#10 0x0000559b5914609d in Item_func::convert_const_compared_to_int_field (this=this@entry=0x7f1dae4750d8, thd=thd@entry=0x7f1dae415088) at /test/10.5_dbg/sql/item_cmpfunc.cc:402
#11 0x0000559b5914625e in Item_func::setup_args_and_comparator (this=this@entry=0x7f1dae4750d8, thd=0x7f1dae415088, cmp=cmp@entry=0x7f1dae4751a8) at /test/10.5_dbg/sql/item_cmpfunc.cc:422
#12 0x0000559b59146420 in Item_bool_rowready_func2::fix_length_and_dec (this=0x7f1dae4750d8) at /test/10.5_dbg/sql/item_cmpfunc.cc:455
#13 0x0000559b59175434 in Item_func::fix_fields (this=0x7f1dae4750d8, thd=0x7f1dae415088, ref=<optimized out>) at /test/10.5_dbg/sql/item_func.cc:370
#14 0x0000559b58dd0a5a in Item::fix_fields_if_needed (ref=0x7f1dae4760b8, thd=0x7f1dae415088, this=0x7f1dae4750d8) at /test/10.5_dbg/sql/item.h:976
#15 Item::fix_fields_if_needed_for_scalar (ref=0x7f1dae4760b8, thd=0x7f1dae415088, this=0x7f1dae4750d8) at /test/10.5_dbg/sql/item.h:980
#16 Item::fix_fields_if_needed_for_bool (ref=0x7f1dae4760b8, thd=0x7f1dae415088, this=0x7f1dae4750d8) at /test/10.5_dbg/sql/item.h:984
#17 setup_conds (thd=thd@entry=0x7f1dae415088, tables=tables@entry=0x7f1dae4746d0, leaves=..., conds=conds@entry=0x7f1dae4760b8) at /test/10.5_dbg/sql/sql_base.cc:8275
#18 0x0000559b58eb8f4c in setup_without_group (reserved=0x7f1dae474484, hidden_group_fields=0x7f1dae475f8f, win_funcs=..., win_specs=..., group=0x0, order=0x0, conds=0x7f1dae4760b8, all_fields=..., fields=..., leaves=..., tables=0x7f1dae4746d0, ref_pointer_array=..., thd=0x7f1dae415088) at /test/10.5_dbg/sql/sql_select.cc:693
#20 0x0000559b58ec6385 in mysql_select (thd=thd@entry=0x7f1dae415088, tables=0x7f1dae4746d0, fields=..., conds=0x7f1dae4750d8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f1dae475c80, unit=0x7f1dae419098, select_lex=0x7f1dae474178) at /test/10.5_dbg/sql/sql_select.cc:4634
#21 0x0000559b58ec6787 in handle_select (thd=thd@entry=0x7f1dae415088, lex=lex@entry=0x7f1dae418fd0, result=result@entry=0x7f1dae475c80, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
#22 0x0000559b58e50ef4 in execute_sqlcom_select (thd=thd@entry=0x7f1dae415088, all_tables=0x7f1dae4746d0) at /test/10.5_dbg/sql/sql_parse.cc:6172
#23 0x0000559b58e49919 in mysql_execute_command (thd=thd@entry=0x7f1dae415088) at /test/10.5_dbg/sql/sql_parse.cc:3901
#24 0x0000559b58e56f2b in mysql_parse (thd=thd@entry=0x7f1dae415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f1ddbb87450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
#25 0x0000559b58e42c45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f1dae415088, packet=packet@entry=0x7f1dae467089 "SELECT 1 FROM t WHERE c<GEOMFROMTEXT('LINESTRING(-1 1)')", packet_length=packet_length@entry=56, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
#26 0x0000559b58e4149b in do_command (thd=0x7f1dae415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
#27 0x0000559b58f9c415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f1db9fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
#28 0x0000559b58f9c744 in handle_one_connection (arg=arg@entry=0x7f1db9fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
#29 0x0000559b593fcfb0 in pfs_spawn_thread (arg=0x7f1dd9845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
#30 0x00007f1ddafaf6db in start_thread (arg=0x7f1ddbb88700) at pthread_create.c:463
#31 0x00007f1dda3ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Probably the same, but with inet6, so on >=10.5, problem when comparing with bigint.
if I use int, then "4078: Illegal parameter data types int and inet6 for operation '>'"
CREATETABLE t (id bigint(20), col_inet6 inet6 DEFAULT'::');
INSERTINTO t(id) VALUES (1),(2); #Optional
SELECT id > DEFAULT(col_inet6) FROM t;
10.5 d2ddf82a0e3e5cf756ca
#5 0x00007f9af22bd859 in __GI_abort () at abort.c:79
#6 0x00007f9af22bd729 in __assert_fail_base (fmt=0x7f9af2453588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e87c67f9ef "0", file=0x55e87c680730 "/10.5/sql/item.cc", line=9850, function=<optimized out>) at assert.c:92
#7 0x00007f9af22cef36 in __GI___assert_fail (assertion=0x55e87c67f9ef "0", file=0x55e87c680730 "/10.5/sql/item.cc", line=9850, function=0x55e87c6833f8 "int stored_field_cmp_to_item(THD*, Field*, Item*)") at assert.c:101
#8 0x000055e87ba7601f in stored_field_cmp_to_item (thd=0x7f9adc000db8, field=0x7f9adc042400, item=0x7f9adc015ab8) at /10.5/sql/item.cc:9850
#9 0x000055e87ba837c7 in convert_const_to_int (thd=0x7f9adc000db8, field_item=0x7f9adc015828, item=0x7f9adc015ca8) at /10.5/sql/item_cmpfunc.cc:352
#10 0x000055e87ba83bff in Item_func::convert_const_compared_to_int_field (this=0x7f9adc015c08, thd=0x7f9adc000db8) at /10.5/sql/item_cmpfunc.cc:399
#11 0x000055e87ba83dd3 in Item_func::setup_args_and_comparator (this=0x7f9adc015c08, thd=0x7f9adc000db8, cmp=0x7f9adc015cd8) at /10.5/sql/item_cmpfunc.cc:419
#12 0x000055e87ba83fa3 in Item_bool_rowready_func2::fix_length_and_dec (this=0x7f9adc015c08) at /10.5/sql/item_cmpfunc.cc:452
#13 0x000055e87bac3564 in Item_func::fix_fields (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item_func.cc:370
#14 0x000055e87b5a760b in Item::fix_fields_if_needed (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item.h:988
#15 0x000055e87b5a7645 in Item::fix_fields_if_needed_for_scalar (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item.h:992
#16 0x000055e87b62b901 in setup_fields (thd=0x7f9adc000db8, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x7f9adc017208, pre_fix=0x7f9adc015500, allow_sum_func=true) at /10.5/sql/sql_base.cc:7635
#17 0x000055e87b7161b3 in JOIN::prepare (this=0x7f9adc016ee0, tables_init=0x7f9adc015ed8, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f9adc015398, unit_arg=0x7f9adc004f60) at /10.5/sql/sql_select.cc:1243
#18 0x000055e87b722f8c in mysql_select (thd=0x7f9adc000db8, tables=0x7f9adc015ed8, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f9adc016eb8, unit=0x7f9adc004f60, select_lex=0x7f9adc015398) at /10.5/sql/sql_select.cc:4699
#19 0x000055e87b712acb in handle_select (thd=0x7f9adc000db8, lex=0x7f9adc004e98, result=0x7f9adc016eb8, setup_tables_done_option=0) at /10.5/sql/sql_select.cc:417
#20 0x000055e87b6d5430 in execute_sqlcom_select (thd=0x7f9adc000db8, all_tables=0x7f9adc015ed8) at /10.5/sql/sql_parse.cc:6308
#21 0x000055e87b6cc694 in mysql_execute_command (thd=0x7f9adc000db8) at /10.5/sql/sql_parse.cc:4004
#22 0x000055e87b6da2d6 in mysql_parse (thd=0x7f9adc000db8, rawbuf=0x7f9adc0152f0 "SELECT id > DEFAULT(col_inet6) FROM t", length=38, parser_state=0x7f9aecb34490, is_com_multi=false, is_next_command=false) at /10.5/sql/sql_parse.cc:8089
#23 0x000055e87b6c61b1 in dispatch_command (command=COM_QUERY, thd=0x7f9adc000db8, packet=0x7f9adc00b5a9 "SELECT id > DEFAULT(col_inet6) FROM t", packet_length=38, is_com_multi=false, is_next_command=false) at /10.5/sql/sql_parse.cc:1889
#24 0x000055e87b6c49a5 in do_command (thd=0x7f9adc000db8) at /10.5/sql/sql_parse.cc:1370
#25 0x000055e87b872f2f in do_handle_one_connection (connect=0x55e87f3a37b8, put_in_cache=true) at /10.5/sql/sql_connect.cc:1410
#26 0x000055e87b872c92 in handle_one_connection (arg=0x55e87f2a9be8) at /10.5/sql/sql_connect.cc:1312
#27 0x000055e87bdd3c7b in pfs_spawn_thread (arg=0x55e87f3a3188) at /10.5/storage/perfschema/pfs.cc:2201
#28 0x00007f9af27e6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#29 0x00007f9af23ba293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Alice Sherepa
added a comment - Probably the same, but with inet6, so on >=10.5, problem when comparing with bigint.
if I use int, then "4078: Illegal parameter data types int and inet6 for operation '>'"
CREATE TABLE t (id bigint (20), col_inet6 inet6 DEFAULT '::' );
INSERT INTO t(id) VALUES (1),(2); #Optional
SELECT id > DEFAULT (col_inet6) FROM t;
10.5 d2ddf82a0e3e5cf756ca
#5 0x00007f9af22bd859 in __GI_abort () at abort.c:79
#6 0x00007f9af22bd729 in __assert_fail_base (fmt=0x7f9af2453588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e87c67f9ef "0", file=0x55e87c680730 "/10.5/sql/item.cc", line=9850, function=<optimized out>) at assert.c:92
#7 0x00007f9af22cef36 in __GI___assert_fail (assertion=0x55e87c67f9ef "0", file=0x55e87c680730 "/10.5/sql/item.cc", line=9850, function=0x55e87c6833f8 "int stored_field_cmp_to_item(THD*, Field*, Item*)") at assert.c:101
#8 0x000055e87ba7601f in stored_field_cmp_to_item (thd=0x7f9adc000db8, field=0x7f9adc042400, item=0x7f9adc015ab8) at /10.5/sql/item.cc:9850
#9 0x000055e87ba837c7 in convert_const_to_int (thd=0x7f9adc000db8, field_item=0x7f9adc015828, item=0x7f9adc015ca8) at /10.5/sql/item_cmpfunc.cc:352
#10 0x000055e87ba83bff in Item_func::convert_const_compared_to_int_field (this=0x7f9adc015c08, thd=0x7f9adc000db8) at /10.5/sql/item_cmpfunc.cc:399
#11 0x000055e87ba83dd3 in Item_func::setup_args_and_comparator (this=0x7f9adc015c08, thd=0x7f9adc000db8, cmp=0x7f9adc015cd8) at /10.5/sql/item_cmpfunc.cc:419
#12 0x000055e87ba83fa3 in Item_bool_rowready_func2::fix_length_and_dec (this=0x7f9adc015c08) at /10.5/sql/item_cmpfunc.cc:452
#13 0x000055e87bac3564 in Item_func::fix_fields (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item_func.cc:370
#14 0x000055e87b5a760b in Item::fix_fields_if_needed (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item.h:988
#15 0x000055e87b5a7645 in Item::fix_fields_if_needed_for_scalar (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item.h:992
#16 0x000055e87b62b901 in setup_fields (thd=0x7f9adc000db8, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x7f9adc017208, pre_fix=0x7f9adc015500, allow_sum_func=true) at /10.5/sql/sql_base.cc:7635
#17 0x000055e87b7161b3 in JOIN::prepare (this=0x7f9adc016ee0, tables_init=0x7f9adc015ed8, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f9adc015398, unit_arg=0x7f9adc004f60) at /10.5/sql/sql_select.cc:1243
#18 0x000055e87b722f8c in mysql_select (thd=0x7f9adc000db8, tables=0x7f9adc015ed8, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f9adc016eb8, unit=0x7f9adc004f60, select_lex=0x7f9adc015398) at /10.5/sql/sql_select.cc:4699
#19 0x000055e87b712acb in handle_select (thd=0x7f9adc000db8, lex=0x7f9adc004e98, result=0x7f9adc016eb8, setup_tables_done_option=0) at /10.5/sql/sql_select.cc:417
#20 0x000055e87b6d5430 in execute_sqlcom_select (thd=0x7f9adc000db8, all_tables=0x7f9adc015ed8) at /10.5/sql/sql_parse.cc:6308
#21 0x000055e87b6cc694 in mysql_execute_command (thd=0x7f9adc000db8) at /10.5/sql/sql_parse.cc:4004
#22 0x000055e87b6da2d6 in mysql_parse (thd=0x7f9adc000db8, rawbuf=0x7f9adc0152f0 "SELECT id > DEFAULT(col_inet6) FROM t", length=38, parser_state=0x7f9aecb34490, is_com_multi=false, is_next_command=false) at /10.5/sql/sql_parse.cc:8089
#23 0x000055e87b6c61b1 in dispatch_command (command=COM_QUERY, thd=0x7f9adc000db8, packet=0x7f9adc00b5a9 "SELECT id > DEFAULT(col_inet6) FROM t", packet_length=38, is_com_multi=false, is_next_command=false) at /10.5/sql/sql_parse.cc:1889
#24 0x000055e87b6c49a5 in do_command (thd=0x7f9adc000db8) at /10.5/sql/sql_parse.cc:1370
#25 0x000055e87b872f2f in do_handle_one_connection (connect=0x55e87f3a37b8, put_in_cache=true) at /10.5/sql/sql_connect.cc:1410
#26 0x000055e87b872c92 in handle_one_connection (arg=0x55e87f2a9be8) at /10.5/sql/sql_connect.cc:1312
#27 0x000055e87bdd3c7b in pfs_spawn_thread (arg=0x55e87f3a3188) at /10.5/storage/perfschema/pfs.cc:2201
#28 0x00007f9af27e6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#29 0x00007f9af23ba293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Core was generated by `/test/MD190922-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14f7ace02700 (LWP 646261))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x000014f7c5f5e859 in __GI_abort () at abort.c:79
#2 0x000014f7c5f5e729 in __assert_fail_base (fmt=0x14f7c60f4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e8079363c6 "0", file=0x55e80791b780 "/test/10.11_dbg/sql/item.cc", line=10068, function=<optimized out>) at assert.c:92
#3 0x000014f7c5f6ffd6 in __GI___assert_fail (assertion=assertion@entry=0x55e8079363c6 "0", file=file@entry=0x55e80791b780 "/test/10.11_dbg/sql/item.cc", line=line@entry=10068, function=function@entry=0x55e80791e400 "int stored_field_cmp_to_item(THD*, Field*, Item*)") at assert.c:101
#4 0x000055e806eb4c42 in stored_field_cmp_to_item (thd=thd@entry=0x14f75c000d48, field=field@entry=0x14f75c023fa0, item=0x14f75c0141c0) at /test/10.11_dbg/sql/item.cc:10068
#5 0x000055e806ec6de3 in convert_const_to_int (thd=thd@entry=0x14f75c000d48, field_item=field_item@entry=0x14f75c013fa8, item=0x14f75c0142e8) at /test/10.11_dbg/sql/item_cmpfunc.cc:359
#6 0x000055e806ed1b6d in Item_func::convert_const_compared_to_int_field (this=this@entry=0x14f75c014268, thd=thd@entry=0x14f75c000d48) at /test/10.11_dbg/sql/item_cmpfunc.cc:407
#7 0x000055e806ed1d10 in Item_func::setup_args_and_comparator (this=this@entry=0x14f75c014268, thd=0x14f75c000d48, cmp=cmp@entry=0x14f75c014318) at /test/10.11_dbg/sql/item_cmpfunc.cc:427
#8 0x000055e806ed1ecc in Item_bool_rowready_func2::fix_length_and_dec (this=0x14f75c014268, thd=<optimized out>) at /test/10.11_dbg/sql/item_cmpfunc.cc:460
#9 0x000055e806f06aa5 in Item_func::fix_fields (this=0x14f75c014268, thd=0x14f75c000d48, ref=<optimized out>) at /test/10.11_dbg/sql/item_func.cc:362
#10 0x000055e806b0f3e3 in Item::fix_fields_if_needed (ref=0x14f75c015280, thd=0x14f75c000d48, this=0x14f75c014268) at /test/10.11_dbg/sql/item.h:1152
#11 Item::fix_fields_if_needed_for_scalar (ref=0x14f75c015280, thd=0x14f75c000d48, this=0x14f75c014268) at /test/10.11_dbg/sql/item.h:1148
#12 Item::fix_fields_if_needed_for_bool (ref=0x14f75c015280, thd=0x14f75c000d48, this=0x14f75c014268) at /test/10.11_dbg/sql/item.h:1152
#13 setup_conds (thd=thd@entry=0x14f75c000d48, tables=tables@entry=0x14f75c0138a0, leaves=@0x14f75c0134e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f75c0153e8, last = 0x14f75c0153e8, elements = 1}, <No data fields>}, conds=conds@entry=0x14f75c015280) at /test/10.11_dbg/sql/sql_base.cc:8804
#14 0x000055e806c07913 in setup_without_group (reserved=0x14f75c013684, hidden_group_fields=0x14f75c015147, win_funcs=@0x14f75c013718: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e80815fbe0 <end_of_list>, last = 0x14f75c013718, elements = 0}, <No data fields>}, win_specs=@0x14f75c013700: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e80815fbe0 <end_of_list>, last = 0x14f75c013700, elements = 0}, <No data fields>}, group=0x0, order=0x0, conds=0x14f75c015280, all_fields=@0x14f75c015198: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f75c013858, last = 0x14f75c013858, elements = 2}, <No data fields>}, fields=@0x14f75c013568: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f75c013858, last = 0x14f75c015658, elements = 2}, <No data fields>}, leaves=@0x14f75c0134e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f75c0153e8, last = 0x14f75c0153e8, elements = 1}, <No data fields>}, tables=0x14f75c0138a0, ref_pointer_array=<optimized out>, thd=0x14f75c000d48) at /test/10.11_dbg/sql/sql_select.cc:885
#16 0x000055e806c1eb82 in mysql_select (thd=thd@entry=0x14f75c000d48, tables=0x14f75c0138a0, fields=@0x14f75c013568: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f75c013858, last = 0x14f75c015658, elements = 2}, <No data fields>}, conds=0x14f75c014268, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x14f75c014dd8, unit=0x14f75c004f80, select_lex=0x14f75c0132c8) at /test/10.11_dbg/sql/sql_select.cc:5046
#17 0x000055e806c1eda0 in handle_select (thd=thd@entry=0x14f75c000d48, lex=lex@entry=0x14f75c004ea8, result=result@entry=0x14f75c014dd8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.11_dbg/sql/sql_select.cc:582
#18 0x000055e806b88d94 in execute_sqlcom_select (thd=thd@entry=0x14f75c000d48, all_tables=0x14f75c0138a0) at /test/10.11_dbg/sql/sql_parse.cc:6261
#19 0x000055e806b95109 in mysql_execute_command (thd=thd@entry=0x14f75c000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:3945
#20 0x000055e806b8303c in mysql_parse (thd=thd@entry=0x14f75c000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14f7ace01330) at /test/10.11_dbg/sql/sql_parse.cc:8037
#21 0x000055e806b9066d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f75c000d48, packet=packet@entry=0x14f75c00aed9 "SELECT * FROM t where c2=ST_GeomFromText('POINT(1 1)')", packet_length=packet_length@entry=54, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1345
#22 0x000055e806b92d97 in do_command (thd=0x14f75c000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
#23 0x000055e806cf6fb9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e80a9c45d8, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1416
#24 0x000055e806cf74c3 in handle_one_connection (arg=0x55e80a9c45d8) at /test/10.11_dbg/sql/sql_connect.cc:1318
#25 0x000014f7c646f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#26 0x000014f7c605b133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
11.4.0-opt>EXPLAIN SELECT 1 FROM t WHERE a=GEOMFROMTEXT ('LINESTRING (-1 1,1 1,-1 1,-1 1,1 1)')\G
...
Extra: Impossible WHERE noticed after reading const tables
Roel Van de Paar
added a comment - - edited New stack with
CREATE TABLE t (a SERIAL);
EXPLAIN SELECT 1 FROM t WHERE a=GEOMFROMTEXT ( 'LINESTRING (-1 1,1 1,-1 1,-1 1,1 1)' );
11.4.0 9b1ea6904965dd345478dedd80e181ad54c767da (Debug)
0|SIGABRT|stored_field_cmp_to_item|convert_const_to_int|Item_func::convert_const_compared_to_int_field|Item_bool_rowready_func2::fix_length_and_dec
On optimized we get:
11.4.0 9b1ea6904965dd345478dedd80e181ad54c767da (Optimized)
11.4.0-opt>EXPLAIN SELECT 1 FROM t WHERE a=GEOMFROMTEXT ('LINESTRING (-1 1,1 1,-1 1,-1 1,1 1)')\G
...
Extra: Impossible WHERE noticed after reading const tables
#14 0x000055ffdcfe916b in Item_bool_rowready_func2::fix_length_and_dec (this=0x52b0000864c8) at /test/10.5_dbg_san/sql/item_cmpfunc.cc:444
#15 0x000055ffdd0f2c62 in Item_func::fix_fields (this=0x52b0000864c8, thd=<optimized out>, ref=<optimized out>)at /test/10.5_dbg_san/sql/item_func.cc:389
#16 0x000055ffdbd7616c in Item::fix_fields_if_needed_for_scalar (this=0x52b0000864c8, thd=thd@entry=0x52b00007e218, ref=ref@entry=0x52b000087540) at /test/10.5_dbg_san/sql/item.h:1009
#17 0x000055ffdbf4d3a4 in Item::fix_fields_if_needed_for_bool (this=<optimized out>, thd=0x52b00007e218, ref=0x52b000087540)at /test/10.5_dbg_san/sql/item.h:1013
#18 setup_conds (thd=thd@entry=0x52b00007e218, tables=tables@entry=0x52b000085990, leaves=@0x52b000085558: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x52b000087848, last = 0x52b000087848, elements = 1}, <No data fields>}, conds=conds@entry=0x52b000087540)at /test/10.5_dbg_san/sql/sql_base.cc:8437
#19 0x000055ffdc2c83a2 in setup_without_group (thd=<optimized out>, ref_pointer_array={m_array = 0x52b000087b68, m_size = 5}, tables=0x52b000085990, leaves=@0x52b000085558: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x52b000087848, last = 0x52b000087848, elements = 1}, <No data fields>}, fields=@0x52b000085468: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x52b000085928, last = 0x52b000087b50, elements = 2}, <No data fields>}, all_fields=@0x52b000087458: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x52b000085928, last = 0x52b000085928, elements = 2}, <No data fields>}, conds=0x52b000087540, order=0x0, group=0x0, win_specs=@0x52b000085768: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55ffdffd1c00 <end_of_list>, last = 0x52b000085768, elements = 0}, <No data fields>}, win_funcs=@0x52b000085788: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55ffdffd1c00 <end_of_list>, last = 0x52b000085788, elements = 0}, <No data fields>}, hidden_group_fields=0x52b000087417)at /test/10.5_dbg_san/sql/sql_select.cc:771
Probably the same, but with inet6, so on >=10.5, problem when comparing with bigint.
if I use int, then "4078: Illegal parameter data types int and inet6 for operation '>'"
10.5 d2ddf82a0e3e5cf756ca
#5 0x00007f9af22bd859 in __GI_abort () at abort.c:79
#6 0x00007f9af22bd729 in __assert_fail_base (fmt=0x7f9af2453588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e87c67f9ef "0", file=0x55e87c680730 "/10.5/sql/item.cc", line=9850, function=<optimized out>) at assert.c:92
#7 0x00007f9af22cef36 in __GI___assert_fail (assertion=0x55e87c67f9ef "0", file=0x55e87c680730 "/10.5/sql/item.cc", line=9850, function=0x55e87c6833f8 "int stored_field_cmp_to_item(THD*, Field*, Item*)") at assert.c:101
#8 0x000055e87ba7601f in stored_field_cmp_to_item (thd=0x7f9adc000db8, field=0x7f9adc042400, item=0x7f9adc015ab8) at /10.5/sql/item.cc:9850
#9 0x000055e87ba837c7 in convert_const_to_int (thd=0x7f9adc000db8, field_item=0x7f9adc015828, item=0x7f9adc015ca8) at /10.5/sql/item_cmpfunc.cc:352
#10 0x000055e87ba83bff in Item_func::convert_const_compared_to_int_field (this=0x7f9adc015c08, thd=0x7f9adc000db8) at /10.5/sql/item_cmpfunc.cc:399
#11 0x000055e87ba83dd3 in Item_func::setup_args_and_comparator (this=0x7f9adc015c08, thd=0x7f9adc000db8, cmp=0x7f9adc015cd8) at /10.5/sql/item_cmpfunc.cc:419
#12 0x000055e87ba83fa3 in Item_bool_rowready_func2::fix_length_and_dec (this=0x7f9adc015c08) at /10.5/sql/item_cmpfunc.cc:452
#13 0x000055e87bac3564 in Item_func::fix_fields (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item_func.cc:370
#14 0x000055e87b5a760b in Item::fix_fields_if_needed (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item.h:988
#15 0x000055e87b5a7645 in Item::fix_fields_if_needed_for_scalar (this=0x7f9adc015c08, thd=0x7f9adc000db8, ref=0x7f9adc015e50) at /10.5/sql/item.h:992
#16 0x000055e87b62b901 in setup_fields (thd=0x7f9adc000db8, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x7f9adc017208, pre_fix=0x7f9adc015500, allow_sum_func=true) at /10.5/sql/sql_base.cc:7635
#17 0x000055e87b7161b3 in JOIN::prepare (this=0x7f9adc016ee0, tables_init=0x7f9adc015ed8, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f9adc015398, unit_arg=0x7f9adc004f60) at /10.5/sql/sql_select.cc:1243
#18 0x000055e87b722f8c in mysql_select (thd=0x7f9adc000db8, tables=0x7f9adc015ed8, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f9adc016eb8, unit=0x7f9adc004f60, select_lex=0x7f9adc015398) at /10.5/sql/sql_select.cc:4699
#19 0x000055e87b712acb in handle_select (thd=0x7f9adc000db8, lex=0x7f9adc004e98, result=0x7f9adc016eb8, setup_tables_done_option=0) at /10.5/sql/sql_select.cc:417
#20 0x000055e87b6d5430 in execute_sqlcom_select (thd=0x7f9adc000db8, all_tables=0x7f9adc015ed8) at /10.5/sql/sql_parse.cc:6308
#21 0x000055e87b6cc694 in mysql_execute_command (thd=0x7f9adc000db8) at /10.5/sql/sql_parse.cc:4004
#22 0x000055e87b6da2d6 in mysql_parse (thd=0x7f9adc000db8, rawbuf=0x7f9adc0152f0 "SELECT id > DEFAULT(col_inet6) FROM t", length=38, parser_state=0x7f9aecb34490, is_com_multi=false, is_next_command=false) at /10.5/sql/sql_parse.cc:8089
#23 0x000055e87b6c61b1 in dispatch_command (command=COM_QUERY, thd=0x7f9adc000db8, packet=0x7f9adc00b5a9 "SELECT id > DEFAULT(col_inet6) FROM t", packet_length=38, is_com_multi=false, is_next_command=false) at /10.5/sql/sql_parse.cc:1889
#24 0x000055e87b6c49a5 in do_command (thd=0x7f9adc000db8) at /10.5/sql/sql_parse.cc:1370
#25 0x000055e87b872f2f in do_handle_one_connection (connect=0x55e87f3a37b8, put_in_cache=true) at /10.5/sql/sql_connect.cc:1410
#26 0x000055e87b872c92 in handle_one_connection (arg=0x55e87f2a9be8) at /10.5/sql/sql_connect.cc:1312
#27 0x000055e87bdd3c7b in pfs_spawn_thread (arg=0x55e87f3a3188) at /10.5/storage/perfschema/pfs.cc:2201
#28 0x00007f9af27e6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#29 0x00007f9af23ba293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95