mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '11.1' into 11.2
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
SET @start_encr_threads = @@global.innodb_encryption_threads;
|
||||
SET @start_encrypt_tables = @@global.innodb_encrypt_tables;
|
||||
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
|
||||
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
|
||||
@@ -116,3 +118,42 @@ NOT FOUND /temp/ in t2.ibd
|
||||
# t3 ... on expecting NOT FOUND
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2, t3;
|
||||
#
|
||||
# MDEV-34670 IMPORT TABLESPACE unnecessary traverses
|
||||
# tablespace list
|
||||
#
|
||||
SET GLOBAL innodb_encrypt_tables= OFF;
|
||||
SET GLOBAL innodb_encryption_threads= 0;
|
||||
CREATE TABLE t1(f1 int,f2 text)ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1, "InnoDB");
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
ALTER TABLE t2 DISCARD TABLESPACE;
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
ALTER TABLE t2 IMPORT TABLESPACE;
|
||||
SET GLOBAL innodb_encryption_threads=2;
|
||||
SET GLOBAL innodb_encrypt_tables = ON;
|
||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
NAME
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
NAME
|
||||
innodb_system
|
||||
test/t1
|
||||
test/t2
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
# Wait max 10 min for key encryption threads to decrypt all spaces
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
NAME
|
||||
innodb_system
|
||||
test/t1
|
||||
test/t2
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
NAME
|
||||
DROP TABLE t1, t2;
|
||||
SET GLOBAL innodb_encryption_threads=@start_encr_threads;
|
||||
SET GLOBAL innodb_encrypt_tables=@start_encrypt_tables;
|
||||
|
@@ -1253,15 +1253,10 @@ insert into t1 values (1,1,'foo');
|
||||
insert into t1 values (2,2,'bar');
|
||||
select
|
||||
count(*) over (order by a,b
|
||||
range between unbounded preceding and current row) as count
|
||||
range between 1 preceding and current row) as count
|
||||
from t1;
|
||||
ERROR HY000: RANGE-type frame requires ORDER BY clause with single sort key
|
||||
select
|
||||
count(*) over (order by c
|
||||
range between unbounded preceding and current row) as count
|
||||
from t1;
|
||||
ERROR HY000: Numeric datatype is required for RANGE-type frame
|
||||
select
|
||||
count(*) over (order by a
|
||||
range between 'abcd' preceding and current row) as count
|
||||
from t1;
|
||||
@@ -1283,6 +1278,56 @@ rows between current row and 3.14 following) as count
|
||||
from t1;
|
||||
ERROR HY000: Integer is required for ROWS-type frame
|
||||
#
|
||||
# MDEV-19052 Range-type window frame supports only numeric datatype
|
||||
#
|
||||
select
|
||||
count(*) over (order by c
|
||||
range between unbounded preceding and current row) as r
|
||||
from t1;
|
||||
r
|
||||
1
|
||||
2
|
||||
select
|
||||
count(*) over (order by c
|
||||
range between current row and unbounded following) as r
|
||||
from t1;
|
||||
r
|
||||
2
|
||||
1
|
||||
select
|
||||
count(*) over (order by c
|
||||
range between unbounded preceding and unbounded following) as r
|
||||
from t1;
|
||||
r
|
||||
2
|
||||
2
|
||||
create table t2 (a int, b varchar(5));
|
||||
insert into t2 values (1,'a'), (2, 'b'), (3, 'c');
|
||||
select sum(a) over (order by b range between unbounded preceding and current row) as r from t2;
|
||||
r
|
||||
1
|
||||
3
|
||||
6
|
||||
insert into t1 values (3,3,'goo');
|
||||
insert into t1 values (3,1,'har');
|
||||
insert into t1 values (1,4,'har');
|
||||
select a, b, sum(b) over (order by a, b desc range between unbounded preceding and current row) as r from t1;
|
||||
a b r
|
||||
1 4 4
|
||||
1 1 5
|
||||
2 2 7
|
||||
3 3 10
|
||||
3 1 11
|
||||
select a, b, sum(b) over (order by a desc, b range between unbounded preceding and current row) as r from t1;
|
||||
a b r
|
||||
3 1 1
|
||||
3 3 4
|
||||
2 2 6
|
||||
1 1 7
|
||||
1 4 11
|
||||
drop table t2;
|
||||
delete from t1 where a >= 3 or b = 4;
|
||||
#
|
||||
# EXCLUDE clause is parsed but not supported
|
||||
#
|
||||
select
|
||||
|
Reference in New Issue
Block a user