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
b30f26e3
Commit
b30f26e3
authored
Jul 22, 2021
by
Anel Husakovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Record tempfiles_encrypted test failure
parent
4aeb2b1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
287 additions
and
0 deletions
+287
-0
mysql-test/suite/encryption/r/tempfiles_encrypted.result
mysql-test/suite/encryption/r/tempfiles_encrypted.result
+287
-0
No files found.
mysql-test/suite/encryption/r/tempfiles_encrypted.result
View file @
b30f26e3
...
...
@@ -3917,6 +3917,293 @@ sum(i) over () IN ( SELECT 1 FROM t1 a)
0
DROP TABLE t1;
#
# MDEV-25565: 2-nd call of SP with SELECT from view / derived table / CTE
# returning the result of calculation of 2 window
# functions that use the same window specification
#
create table t1 (a int);
insert into t1 values (3), (7), (1), (7), (1), (1), (3), (1), (5);
create view v2 as select a from t1 group by a;
create view v1 as select * from v2;
create procedure sp1() select v1.a,
sum(v1.a) over (partition by v1.a order by v1.a) as k,
avg(v1.a) over (partition by v1.a order by v1.a) as m
from v1;
call sp1();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp1();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "select v1.a,
sum(v1.a) over (partition by v1.a order by v1.a) as k,
avg(v1.a) over (partition by v1.a order by v1.a) as m
from v1";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
create procedure sp2() select * from
( select dt1.a,
sum(dt1.a) over (partition by dt1.a order by dt1.a) as k,
avg(dt1.a) over (partition by dt1.a order by dt1.a) as m
from (select * from v2) as dt1
) as dt;
call sp2();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp2();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "select * from
( select dt1.a,
sum(dt1.a) over (partition by dt1.a order by dt1.a) as k,
avg(dt1.a) over (partition by dt1.a order by dt1.a) as m
from (select * from v2) as dt1
) as dt";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
create procedure sp3() select * from
( select dt1.a,
sum(dt1.a) over (partition by dt1.a order by dt1.a) as k,
avg(dt1.a) over (partition by dt1.a order by dt1.a) as m
from ( select * from (select * from t1 group by a) as dt2 ) as dt1
) as dt;
call sp3();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp3();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "select * from
( select dt1.a,
sum(dt1.a) over (partition by dt1.a order by dt1.a) as k,
avg(dt1.a) over (partition by dt1.a order by dt1.a) as m
from ( select * from (select * from t1 group by a) as dt2 ) as dt1
) as dt";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
create procedure sp4() with cte1 as (select * from (select * from t1 group by a) as dt2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte;
call sp4();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp4();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "with cte1 as (select * from (select * from t1 group by a) as dt2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
create procedure sp5() with cte1 as (select * from v2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte;
call sp5();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp5();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "with cte1 as (select * from v2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
create procedure sp6() with
cte1 as (with cte2 as (select * from t1 group by a) select * from cte2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte;
call sp6();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp6();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "with
cte1 as (with cte2 as (select * from t1 group by a) select * from cte2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
create procedure sp7() with
cte2 as (select * from v1),
cte1 as (select * from cte2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte;
call sp7();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
call sp7();
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
prepare stmt from "with
cte2 as (select * from v1),
cte1 as (select * from cte2),
cte as
( select cte1.a,
sum(cte1.a) over (partition by cte1.a order by cte1.a) as k,
avg(cte1.a) over (partition by cte1.a order by cte1.a) as m
from cte1 )
select * from cte";
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
execute stmt;
a k m
1 1 1.0000
3 3 3.0000
5 5 5.0000
7 7 7.0000
deallocate prepare stmt;
drop procedure sp1;
drop procedure sp2;
drop procedure sp3;
drop procedure sp4;
drop procedure sp5;
drop procedure sp6;
drop procedure sp7;
drop view v1,v2;
drop table t1;
#
# End of 10.2 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