[MDEV-28606] Server crashes in st_select_lex::add_table_to_list instead of error 1066: Not unique table/alias Created: 2022-05-18  Updated: 2022-05-18  Resolved: 2022-05-18

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.2
Fix Version/s: 10.2.44

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: not-10.3


 Description   

CREATE TABLE t1 (i int) ;
INSERT INTO t1 VALUES (1),(2),(3) ;
 
WITH cte1 AS (SELECT i FROM t1) SELECT i FROM cte1  NATURAL JOIN cte1;

bb-10.2-release 84984b79f27399d01

Version: '10.2.44-MariaDB-debug-log'  
220518  9:46:27 [ERROR] mysqld got signal 11 ;
 
Server version: 10.2.44-MariaDB-debug-log
 
sql/signal_handler.cc:221(handle_fatal_signal)[0x557dfcc756c0]
sql/sql_parse.cc:8042(st_select_lex::add_table_to_list(THD*, Table_ident*, st_mysql_lex_string*, unsigned long, thr_lock_type, enum_mdl_type, List<Index_hint>*, List<String>*, st_mysql_lex_string*))[0x557dfc62a133]
sql/sql_yacc.yy:11087(MYSQLparse(THD*))[0x557dfcb74340]
sql/sql_parse.cc:10139(parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool))[0x557dfc6365a5]
sql/sql_parse.cc:7746(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x557dfc627463]
sql/sql_parse.cc:1830(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x557dfc5fe8fb]
sql/sql_parse.cc:1381(do_command(THD*))[0x557dfc5fb32c]
sql/sql_connect.cc:1336(do_handle_one_connection(CONNECT*))[0x557dfc9a81f2]
sql/sql_connect.cc:1242(handle_one_connection)[0x557dfc9a7ab3]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x557dfde43766]
nptl/pthread_create.c:487(start_thread)[0x7f05c634cfa3]
x86_64/clone.S:97(clone)[0x7f05c56f3eff]
 
Query (0x62b000000290): WITH cte1 AS (SELECT i FROM t1) SELECT i FROM cte1  NATURAL JOIN cte1


Generated at Thu Feb 08 10:02:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.