[MDEV-22385] Assertion `0' failed in stored_field_cmp_to_item on SELECT Created: 2020-04-28  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: GIS
Affects Version/s: 10.4.13, 10.5.2, 10.5.3, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Alexey Botchkov
Resolution: Unresolved Votes: 0
Labels: GIS, not-10.1, not-10.2, not-10.3, regression

Issue Links:
Relates
relates to MDEV-23800 Assertion `!result' failed in convert... Confirmed

 Description   

USE test;
CREATE TABLE t(c BIGINT);
SELECT 1 FROM t WHERE c<GEOMFROMTEXT('LINESTRING(-1 1)');

Leads to:

10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

mysqld: /test/10.5_dbg/sql/item.cc:9742: int stored_field_cmp_to_item(THD*, Field*, Item*): Assertion `0' failed.

10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
[Current thread is 1 (Thread 0x7f1ddbb88700 (LWP 730940))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1  0x0000559b5994e03d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
#2  0x0000559b590f3d7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5  0x00007f1dda2cc801 in __GI_abort () at abort.c:79
#6  0x00007f1dda2bc39a in __assert_fail_base (fmt=0x7f1dda4437d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 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:92
#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
#19 JOIN::prepare (this=this@entry=0x7f1dae475ca8, tables_init=tables_init@entry=0x7f1dae4746d0, conds_init=conds_init@entry=0x7f1dae4750d8, 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=0x7f1dae474178, unit_arg=0x7f1dae419098) at /test/10.5_dbg/sql/sql_select.cc:1246
#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

Bug confirmed present in:
MariaDB: 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

Bug confirmed not present in:
MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

MariaDB 10.3.23 (dbg);

10.3.23>SELECT 1 FROM t WHERE c<GEOMFROMTEXT('LINESTRING(-1 1)');
Empty set, 1 warning (0.002 sec)
 
10.3.23>SHOW WARNINGS\G
*************************** 1. row ***************************
  Level: Warning
   Code: 1292
Message: Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x02\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0\xBF\x00\x00\x00\x00\x00\x00\xF0?'
1 row in set (0.000 sec)



 Comments   
Comment by Alice Sherepa [ 2021-03-12 ]

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

Comment by Roel Van de Paar [ 2022-09-28 ]

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)

Generated at Thu Feb 08 09:14:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.