Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1be70728
Commit
1be70728
authored
Jan 12, 2021
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the test case for MDEV-23804
parent
5a1a7141
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
0 deletions
+83
-0
mysql-test/main/derived_cond_pushdown.result
mysql-test/main/derived_cond_pushdown.result
+70
-0
mysql-test/main/derived_cond_pushdown.test
mysql-test/main/derived_cond_pushdown.test
+13
-0
No files found.
mysql-test/main/derived_cond_pushdown.result
View file @
1be70728
...
@@ -17064,4 +17064,74 @@ id
...
@@ -17064,4 +17064,74 @@ id
2
2
3
3
DROP TABLE t;
DROP TABLE t;
#
# MDEV-23804: Server crashes in st_select_lex::collect_grouping_fields_for_derived
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (3),(4);
CREATE VIEW v1 AS SELECT a FROM t1 UNION VALUES (3),(4);
ANALYZE FORMAT=JSON SELECT * from v1 WHERE a=3;
ANALYZE
{
"query_block": {
"select_id": 1,
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
"r_loops": 1,
"rows": 4,
"r_rows": 2,
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "v1.a = 3",
"materialized": {
"query_block": {
"union_result": {
"table_name": "<union2,3>",
"access_type": "ALL",
"r_loops": 1,
"r_rows": 2,
"query_specifications": [
{
"query_block": {
"select_id": 2,
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "t1",
"access_type": "ALL",
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "t1.a = 3"
}
}
},
{
"query_block": {
"select_id": 3,
"operation": "UNION",
"table": {
"message": "No tables used"
}
}
}
]
}
}
}
}
}
}
SELECT * from v1 WHERE a=3;
a
3
DROP VIEW v1;
DROP TABLE t1;
# End of 10.3 tests
# End of 10.3 tests
mysql-test/main/derived_cond_pushdown.test
View file @
1be70728
...
@@ -3466,4 +3466,17 @@ eval set statement optimizer_switch='split_materialized=on' for $q;
...
@@ -3466,4 +3466,17 @@ eval set statement optimizer_switch='split_materialized=on' for $q;
DROP
TABLE
t
;
DROP
TABLE
t
;
--
echo
#
--
echo
# MDEV-23804: Server crashes in st_select_lex::collect_grouping_fields_for_derived
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
3
),(
4
);
CREATE
VIEW
v1
AS
SELECT
a
FROM
t1
UNION
VALUES
(
3
),(
4
);
--
source
include
/
analyze
-
format
.
inc
ANALYZE
FORMAT
=
JSON
SELECT
*
from
v1
WHERE
a
=
3
;
SELECT
*
from
v1
WHERE
a
=
3
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
# End of 10.3 tests
--
echo
# End of 10.3 tests
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment