mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-17781: Server crashes in next_linear_tab
For degenerate joins we may have JOIN::table_list as NULL, so instead of using JOIN::top_join_tab_count use the function JOIN::exec_join_tab_cnt to get the number of tables joined at the top level.
This commit is contained in:
@ -2265,6 +2265,20 @@ insert into t1 values (1),(2),(3);
|
||||
SELECT rank() OVER (ORDER BY 1), ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4))) FROM t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17781: Server crashes in next_linear_tab
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (i1 int);
|
||||
explain
|
||||
(SELECT AVG(0) OVER (), MAX('2') FROM t1)
|
||||
UNION ALL
|
||||
(SELECT AVG(0) OVER (), MAX('2') FROM t1);
|
||||
(SELECT AVG(0) OVER (), MAX('2') FROM t1)
|
||||
UNION ALL
|
||||
(SELECT AVG(0) OVER (), MAX('2') FROM t1);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user