|
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
|
|
|
Additional testcase and versions update
CREATE TABLE t (c INT, c2 BIGINT) ENGINE=InnoDB;
|
SELECT * FROM t where c2=ST_GeomFromText('POINT(1 1)'); # Repeat as needed
|
Leads to:
|
10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)
|
mysqld: /test/10.11_dbg/sql/item.cc:10068: int stored_field_cmp_to_item(THD*, Field*, Item*): Assertion `0' failed.
|
|
10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)
|
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
|
#15 JOIN::prepare (this=this@entry=0x14f75c014e00, tables_init=tables_init@entry=0x14f75c0138a0, conds_init=conds_init@entry=0x14f75c014268, og_num=og_num@entry=0, order_init=order_init@entry=0x0, skip_order_by=skip_order_by@entry=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x14f75c0132c8, unit_arg=0x14f75c004f80) at /test/10.11_dbg/sql/sql_select.cc:1457
|
#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
|
Bug confirmed present in:
MariaDB: 10.4.27 (dbg), 10.5.18 (dbg), 10.6.10 (dbg), 10.7.6 (dbg), 10.8.5 (dbg), 10.9.3 (dbg), 10.10.2 (dbg), 10.11.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.37 (dbg), 10.3.37 (opt), 10.4.27 (opt), 10.5.18 (opt), 10.6.10 (opt), 10.7.6 (opt), 10.8.5 (opt), 10.9.3 (opt), 10.10.2 (opt), 10.11.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt)
10.3 Gives:
|
10.3.37 32bab2ce0518d829b4f97a272fc2431169744c75 (Debug)
|
10.3.37-dbg>SELECT * FROM t where c2=ST_GeomFromText('POINT(1 1)');
|
Empty set, 1 warning (0.001 sec)
|
|
10.3.37-dbg>SHOW WARNINGS;
|
+---------+------+------------------------------------------------------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+------------------------------------------------------------------------------------------------------------------------------------+
|
| Warning | 1292 | Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?' |
|
+---------+------+------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
|