Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
12.1
-
None
-
Q3/2025 Maintenance
Description
When we use the default SQL_MODE the given SQL fails with SQL syntax error.
SET sql_mode=ORACLE; |
UNTIL (EXISTS (SELECT 1) OR NOT EXISTS (SELECT 1)) AND COUNT<0 END REPEAT; |
Leads to
MDEV-34319 CS 12.0.1 6f01debfe6ed37f85508c722bf4ae87af2288205 (Optimized) Build 20/05/2025 |
Core was generated by `/test/mtest/MDEV-34319/MD200525-mariadb-12.0.1-linux-x86_64-opt/bin/mariadbd --'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 Item_subselect::init (this=0x72a9b4019810, select_lex=0x72a9b4018a38, result=0x72a9b4019988)at /test/mtest/MDEV-34319/12.0_opt/sql/item_subselect.cc:124
|
 |
[Current thread is 1 (LWP 2565788)]
|
(gdb) bt
|
#0 Item_subselect::init (this=0x72a9b4019810, select_lex=0x72a9b4018a38, result=0x72a9b4019988)at /test/mtest/MDEV-34319/12.0_opt/sql/item_subselect.cc:124
|
#1 0x00005c2b21b1a20e in Item_exists_subselect::Item_exists_subselect (this=0x72a9b4019810, thd=0x72a9b4000c68, select_lex=0x72a9b4018a38)at /test/mtest/MDEV-34319/12.0_opt/sql/item_subselect.cc:1611
|
#2 0x00005c2b21a037a1 in ORAparse (thd=thd@entry=0x72a9b4000c68)at /test/mtest/MDEV-34319/12.0_opt/sql/sql_yacc.yy:10273
|
#3 0x00005c2b217cea56 in parse_sql (thd=thd@entry=0x72a9b4000c68, parser_state=parser_state@entry=0x72c4c80b6420, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=true)at /test/mtest/MDEV-34319/12.0_opt/sql/sql_parse.cc:10304
|
#4 0x00005c2b217c2401 in mysql_parse (thd=thd@entry=0x72a9b4000c68, rawbuf=0x72a9b40176e0 "UNTIL (EXISTS (SELECT 1) OR NOT EXISTS (SELECT 1)) AND COUNT<0 END REPEAT", length=<optimized out>, parser_state=parser_state@entry=0x72c4c80b6420)at /test/mtest/MDEV-34319/12.0_opt/sql/sql_parse.cc:7843
|
#5 0x00005c2b217c0aaf in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x72a9b4000c68, packet=packet@entry=0x72a9b4008a59 "UNTIL (EXISTS (SELECT 1) OR NOT EXISTS (SELECT 1)) AND COUNT<0 END REPEAT", packet_length=packet_length@entry=73, blocking=true) at /test/mtest/MDEV-34319/12.0_opt/sql/sql_parse.cc:1877
|
#6 0x00005c2b217c29a1 in do_command (thd=thd@entry=0x72a9b4000c68, blocking=true) at /test/mtest/MDEV-34319/12.0_opt/sql/sql_parse.cc:1416
|
#7 0x00005c2b218ef61d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5c2b45484da8, put_in_cache=true)at /test/mtest/MDEV-34319/12.0_opt/sql/sql_connect.cc:1414
|
#8 0x00005c2b218ef3df in handle_one_connection (arg=arg@entry=0x5c2b45484da8)at /test/mtest/MDEV-34319/12.0_opt/sql/sql_connect.cc:1326
|
#9 0x00005c2b21c957a9 in pfs_spawn_thread (arg=0x5c2b454243e8)at /test/mtest/MDEV-34319/12.0_opt/storage/perfschema/pfs.cc:2198
|
#10 0x000072c4ce89caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
|
#11 0x000072c4ce929c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|