Commit 7e54c6cf authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

New upstream version 10.1.39

parent e07d9be7
......@@ -34,11 +34,13 @@ create table t1
--disable_query_log
let $1=200;
begin;
while ($1)
{
eval insert into t1 values (200-$1, $1);
dec $1;
}
commit;
--enable_query_log
# No primary key
......@@ -80,11 +82,13 @@ create table t1 (
show warnings;
--disable_query_log
let $1=30;
begin;
while ($1)
{
eval insert into t1 (key1, key2, filler) values ($1/4, $1/8, 'filler-data');
dec $1;
}
commit;
--enable_query_log
explain select pk from t1 where key1 = 1 and key2 = 1;
select pk from t1 where key2 = 1 and key1 = 1;
......@@ -331,16 +335,20 @@ insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8);
let $1=7;
set @d=8;
begin;
while ($1)
{
eval insert into t1 (key1) select key1+@d from t1;
eval set @d=@d*2;
dec $1;
}
commit;
alter table t1 add index i2(key2);
alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
insert into t1 select 10000+key1, 10000+key2,10000+key3 from t1;
analyze table t1;
# to test the bug, the following must use "sort_union":
......
......@@ -32,12 +32,14 @@ create table t1 (
--disable_query_log
begin;
let $1=1000;
while ($1)
{
eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2');
dec $1;
}
commit;
--enable_query_log
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
......
......@@ -67,18 +67,21 @@ create table t1
create table t0 as select * from t1;
--disable_query_log
--echo # Printing of many insert into t0 values (....) disabled.
begin;
let $cnt=1000;
while ($cnt)
{
eval insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
dec $cnt;
}
commit;
--enable_query_log
alter table t1 disable keys;
--disable_query_log
--echo # Printing of many insert into t1 select .... from t0 disabled.
let $1=4;
begin;
while ($1)
{
let $2=4;
......@@ -94,6 +97,7 @@ while ($1)
}
dec $1;
}
commit;
--echo # Printing of many insert into t1 (...) values (....) disabled.
# Row retrieval tests
......@@ -101,6 +105,7 @@ while ($1)
# insert enough rows for index intersection to be used for (key1,key2)
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 100, 100,'key1-key2-key3-key4');
let $cnt=400;
begin;
while ($cnt)
{
eval insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3');
......@@ -112,6 +117,7 @@ while ($cnt)
eval insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4');
dec $cnt;
}
commit;
--enable_query_log
alter table t1 enable keys;
select count(*) from t1;
......@@ -249,6 +255,7 @@ create table t2 (
--disable_query_log
let $1=8;
begin;
while ($1)
{
eval insert into t2 values (repeat(char($1+64), 8),repeat(char($1+64), 8),'filler1', 'filler2');
......@@ -256,6 +263,7 @@ while ($1)
}
insert into t2 select * from t2;
insert into t2 select * from t2;
commit;
--enable_query_log
# The table row buffer is reused. Fill it with rows that don't match.
......
......@@ -56,14 +56,14 @@ create table t1
);
--disable_query_log
set autocommit=0;
begin;
let $1=10000;
while ($1)
{
eval insert into t1 values ($1 div 10,$1 mod 100, $1/100,$1/100, $1/100,$1/100,$1/100,$1/100,$1/100, $1 mod 100, $1/1000,'filler-data-$1','filler2');
dec $1;
}
set autocommit=1;
commit;
--enable_query_log
# Verify that range scan on CPK is ROR
......
......@@ -1153,7 +1153,7 @@ checksum table t1, t2, t3, t4, t5, t6, t7 extended;
drop table t1,t2,t3, t4, t5, t6;
#
# Test problem with refering to different fields in same table in UNION
# Test problem with referring to different fields in same table in UNION
# (Bug#2552: UNION returns NULL instead of expected value (innoDB only tables))
#
eval create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=$engine_type;
......
......@@ -31,7 +31,7 @@ openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_
# with SubjectAltName, only for OpenSSL 1.0.2+
cat > demoCA/sanext.conf <<EOF
subjectAltName=DNS:localhost
subjectAltName=IP:127.0.0.1, DNS:localhost
EOF
openssl req -newkey rsa:1024 -keyout serversan-key.pem -out demoCA/serversan-req.pem -days 7300 -nodes -subj '/CN=server/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl ca -keyfile cakey.pem -extfile demoCA/sanext.conf -days 7300 -batch -cert cacert.pem -policy policy_anything -out serversan-cert.pem -infiles demoCA/serversan-req.pem
......
......@@ -195,8 +195,6 @@ my @DEFAULT_SUITES= qw(
sys_vars-
unit-
vcol-
wsrep-
galera-
);
my $opt_suites;
......@@ -3212,6 +3210,10 @@ sub mysql_install_db {
mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql",
$bootstrap_sql_file);
my $gis_sp_path = $source_dist ? "$bindir/scripts" : $sql_dir;
mtr_appendfile_to_file("$gis_sp_path/maria_add_gis_sp_bootstrap.sql",
$bootstrap_sql_file);
# Add the performance tables
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql",
......
......@@ -247,7 +247,7 @@ drop table t1;
#
create table t1 (i int);
insert into t1 values (1);
analyze select * from t1 into @var;
analyze select * into @var from t1 ;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 NULL 100.00 NULL
drop table t1;
......@@ -281,10 +281,10 @@ drop table t1;
#
create table t1(a int);
insert into t1 values (1),(2);
analyze select a from t1 where a <2 into @var;
analyze select a into @var from t1 where a <2 ;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 2.00 100.00 50.00 Using where
analyze select a from t1 into @var;
analyze select a into @var from t1 ;
ERROR 42000: Result consisted of more than one row
analyze insert into t1 select * from t1;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
......
......@@ -245,7 +245,11 @@ Log_name Pos Event_type Server_id End_log_pos Info
RESET MASTER;
SET timestamp=UNIX_TIMESTAMP('2014-11-01 10:20:30');
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE IF EXISTS t1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE IF EXISTS t2;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
ev1 DROP TABLE IF EXISTS t2
......
......@@ -4,6 +4,8 @@ CREATE TABLE t1 (a INT);
CREATE OR REPLACE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10);
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (10)
......@@ -21,10 +23,13 @@ ev1 INSERT INTO t1 VALUES (10)
CREATE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (12);
Warnings:
Note 1537 Event 'ev1' already exists
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (10)
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (13);
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (13)
......
......@@ -73,3 +73,12 @@ Note 1976 Can't drop role 'role_1'; it doesn't exist
DROP ROLE role_1;
ERROR HY000: Operation DROP ROLE failed for 'role_1'
DROP USER u1@localhost;
CREATE ROLE r;
GRANT SHOW DATABASES ON *.* TO r;
CREATE USER foo;
CREATE USER bar;
GRANT r TO foo;
CREATE OR REPLACE USER foo IDENTIFIED WITH non_existing_plugin;
ERROR HY000: Plugin 'non_existing_plugin' is not loaded
DROP ROLE r;
DROP USER bar;
......@@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
big5_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......@@ -447,6 +453,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
big5_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......
......@@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
euckr_korean_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......@@ -367,6 +373,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
euckr_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......
......@@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
gb2312_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......@@ -448,6 +454,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
gb2312_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......
......@@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
gbk_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......@@ -448,6 +454,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
gbk_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......
......@@ -506,6 +506,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
latin1_swedish_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
#
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
#
......@@ -621,6 +627,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
latin1_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE a (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'a (a int)' at line 1
SELECT 'a' as str;
......
......@@ -189,6 +189,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
sjis_japanese_ci
SELECT '\%b' LIKE '%\%';
'_%b' LIKE '%_%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......@@ -355,6 +361,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
sjis_bin
SELECT '\%b' LIKE '%\%';
'_%b' LIKE '%_%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......
......@@ -3033,6 +3033,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
tis620_thai_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
......@@ -3331,6 +3337,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
tis620_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
......
......@@ -6233,6 +6233,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8_unicode_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc"
drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1;
......
......@@ -839,6 +839,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
ucs2_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc"
drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1;
......@@ -1100,6 +1106,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
ucs2_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment