Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.11, 11.4, 11.8, 12.0(EOL)
-
None
Description
query containing cte
with recursive
|
rcte(a) as (select 1 union select a + 1 from rcte where a < 10),
|
cte1 as (select 1 from rcte where id = 1),
|
cte2 as (select 2 from rcte where id = 2)
|
select * from rcte;
|
raises:
select * from rcte' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'id' in 'WHERE'
|
and leads to:
Warning: Internal memory accounting error of 104 bytes
|
on release build and to assertion failure on debug build:
- found 'core.923111' (0/5)
|
Thread 1 (Thread 0x7dce1dddd6c0 (LWP 923118)):
|
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
|
#2 __GI___pthread_kill (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:100
|
#3 0x00005afaf86caf71 in my_write_core (sig=6) at /src/mariadb/mysys/stacktrace.c:424
|
#4 0x00005afaf7cd9d4e in handle_fatal_signal (sig=6) at /src/mariadb/sql/signal_handler.cc:298
|
#5 <signal handler called>
|
#6 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
|
#7 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
|
#8 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
|
#9 0x00007dce290456de in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#10 0x00007dce290288cd in __GI_abort () at ./stdlib/abort.c:73
|
#11 0x00007dce29028830 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at ./assert/assert.c:118
|
#12 0x00005afaf77c5698 in THD::~THD (this=0x7dce0c000dc8, __in_chrg=<optimized out>) at /src/mariadb/sql/sql_class.cc:1916
|
#13 0x00005afaf77c5a16 in THD::~THD (this=0x7dce0c000dc8, __in_chrg=<optimized out>) at /src/mariadb/sql/sql_class.cc:1929
|
#14 0x00005afaf7a7ec2a in do_handle_one_connection (connect=0x0, put_in_cache=true) at /src/mariadb/sql/sql_connect.cc:1455
|
#15 0x00005afaf7a7e7df in handle_one_connection (arg=0x5afb340e1cf8) at /src/mariadb/sql/sql_connect.cc:1326
|
#16 0x00005afaf805f44e in pfs_spawn_thread (arg=0x5afb3406cf78) at /src/mariadb/storage/perfschema/pfs.cc:2198
|
#17 0x00007dce290a2ef1 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:448
|
#18 0x00007dce2913445c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Running this query in a loop multiplies memory leak by the number of iterations.
Reproduced on main(6a2afb42)