Skip to content

Commit 1fc5a6f

Browse files
committed
Merge branch '10.0' into 10.1
2 parents 87dc4e9 + 1144acb commit 1fc5a6f

32 files changed

+542
-319
lines changed

CREDITS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Microsoft https://microsoft.com/ (2017)
1010
Tencent Cloud https://cloud.tencent.com (2017)
1111
Development Bank of Singapore https://dbs.com (2016)
1212
IBM https://www.ibm.com (2017)
13+
Tencent Games http://game.qq.com/ (2018)
1314
Visma https://visma.com (2015)
14-
Acronis http://acronis.com (2016)
15+
Acronis https://acronis.com (2016)
1516
Nexedi https://www.nexedi.com (2016)
17+
Percona https://www.percona.com (2018)
1618
Tencent Game DBA http://tencentdba.com/about (2016)
1719
Tencent TDSQL http://tdsql.org (2016)
1820
Verkkokauppa.com https://www.verkkokauppa.com (2015)

mysql-test/r/contributors.result

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ MariaDB Corporation https://mariadb.com Founding member, Platinum Sponsor of the
88
Visma https://visma.com Gold Sponsor of the MariaDB Foundation
99
DBS https://dbs.com Gold Sponsor of the MariaDB Foundation
1010
IBM https://www.ibm.com Gold Sponsor of the MariaDB Foundation
11+
Tencent Games http://game.qq.com/ Gold Sponsor of the MariaDB Foundation
1112
Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation
12-
Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation
13+
Acronis https://www.acronis.com Silver Sponsor of the MariaDB Foundation
1314
Verkkokauppa.com https://www.verkkokauppa.com Bronze Sponsor of the MariaDB Foundation
1415
Virtuozzo https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation
1516
Tencent Game DBA http://tencentdba.com/about Bronze Sponsor of the MariaDB Foundation
1617
Tencent TDSQL http://tdsql.org Bronze Sponsor of the MariaDB Foundation
18+
Percona https://www.percona.com/ Bronze Sponsor of the MariaDB Foundation
1719
Google USA Sponsoring encryption, parallel replication and GTID
1820
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
1921
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction

mysql-test/r/create_or_replace.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,3 +471,18 @@ ERROR HY000: Table 't1' was not locked with LOCK TABLES
471471
UNLOCK TABLES;
472472
DROP FUNCTION f1;
473473
DROP TABLE t1;
474+
#
475+
# MDEV-14410 - Assertion `table->pos_in_locked_tables == __null ||
476+
# table->pos_in_locked_tables->table == table' failed in
477+
# mark_used_tables_as_free_for_reuse
478+
#
479+
CREATE TABLE t1 (a INT);
480+
CREATE TABLE t2 (b INT);
481+
CREATE TABLE t3 (c INT);
482+
CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t1 VALUES ();
483+
CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW INSERT INTO t3 SELECT * FROM t1;
484+
LOCK TABLE t1 WRITE, t2 WRITE;
485+
CREATE OR REPLACE TABLE t1 (i INT);
486+
UNLOCK TABLES;
487+
INSERT INTO t2 VALUES (1);
488+
DROP TABLE t1, t2, t3;

mysql-test/r/func_time.result

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,164 @@ PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli'))
28022802
Warnings:
28032803
Warning 1292 Truncated incorrect INTEGER value: '-3S\xFA\xDE?\x00\x00\xCA\xB3\xEEE\xA4\xD1\xC1\xA8'
28042804
#
2805+
# MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
2806+
#
2807+
SELECT
2808+
MAKETIME(1e10,0,0),
2809+
MAKETIME(-1e10,0,0),
2810+
MAKETIME(1e50,0,0),
2811+
MAKETIME(-1e50,0,0),
2812+
MAKETIME(COALESCE(1e50),0,0),
2813+
MAKETIME(COALESCE(-1e50),0,0);
2814+
MAKETIME(1e10,0,0) 838:59:59
2815+
MAKETIME(-1e10,0,0) -838:59:59
2816+
MAKETIME(1e50,0,0) 838:59:59
2817+
MAKETIME(-1e50,0,0) -838:59:59
2818+
MAKETIME(COALESCE(1e50),0,0) 838:59:59
2819+
MAKETIME(COALESCE(-1e50),0,0) -838:59:59
2820+
Warnings:
2821+
Level Warning
2822+
Code 1292
2823+
Message Truncated incorrect time value: '10000000000:00:00'
2824+
Level Warning
2825+
Code 1292
2826+
Message Truncated incorrect time value: '-10000000000:00:00'
2827+
Level Warning
2828+
Code 1292
2829+
Message Truncated incorrect time value: '9223372036854775807:00:00'
2830+
Level Warning
2831+
Code 1292
2832+
Message Truncated incorrect time value: '-9223372036854775808:00:00'
2833+
Level Warning
2834+
Code 1292
2835+
Message Truncated incorrect time value: '9223372036854775807:00:00'
2836+
Level Warning
2837+
Code 1292
2838+
Message Truncated incorrect time value: '-9223372036854775808:00:00'
2839+
CREATE TABLE t1 (a FLOAT);
2840+
INSERT INTO t1 VALUES (1e30),(-1e30);
2841+
SELECT MAKETIME(a,0,0) FROM t1;
2842+
MAKETIME(a,0,0)
2843+
838:59:59
2844+
-838:59:59
2845+
Warnings:
2846+
Warning 1292 Truncated incorrect time value: '9223372036854775807:00:00'
2847+
Warning 1292 Truncated incorrect time value: '-9223372036854775808:00:00'
2848+
DROP TABLE t1;
2849+
#
2850+
# MDEV-17244 MAKETIME(900,0,0.111) returns a wrong result
2851+
#
2852+
SELECT MAKETIME(900,0,0);
2853+
MAKETIME(900,0,0)
2854+
838:59:59
2855+
Warnings:
2856+
Warning 1292 Truncated incorrect time value: '900:00:00'
2857+
SELECT MAKETIME(900,0,0.1);
2858+
MAKETIME(900,0,0.1)
2859+
838:59:59.9
2860+
Warnings:
2861+
Warning 1292 Truncated incorrect time value: '900:00:00'
2862+
SELECT MAKETIME(900,0,0.11);
2863+
MAKETIME(900,0,0.11)
2864+
838:59:59.99
2865+
Warnings:
2866+
Warning 1292 Truncated incorrect time value: '900:00:00'
2867+
SELECT MAKETIME(900,0,0.111);
2868+
MAKETIME(900,0,0.111)
2869+
838:59:59.999
2870+
Warnings:
2871+
Warning 1292 Truncated incorrect time value: '900:00:00'
2872+
SELECT MAKETIME(900,0,0.1111);
2873+
MAKETIME(900,0,0.1111)
2874+
838:59:59.9999
2875+
Warnings:
2876+
Warning 1292 Truncated incorrect time value: '900:00:00'
2877+
SELECT MAKETIME(900,0,0.11111);
2878+
MAKETIME(900,0,0.11111)
2879+
838:59:59.99999
2880+
Warnings:
2881+
Warning 1292 Truncated incorrect time value: '900:00:00'
2882+
SELECT MAKETIME(900,0,0.111111);
2883+
MAKETIME(900,0,0.111111)
2884+
838:59:59.999999
2885+
Warnings:
2886+
Warning 1292 Truncated incorrect time value: '900:00:00'
2887+
SELECT MAKETIME(900,0,0.1111111);
2888+
MAKETIME(900,0,0.1111111)
2889+
838:59:59.999999
2890+
Warnings:
2891+
Warning 1292 Truncated incorrect time value: '900:00:00'
2892+
SELECT MAKETIME(900,0,0.11111111);
2893+
MAKETIME(900,0,0.11111111)
2894+
838:59:59.999999
2895+
Warnings:
2896+
Warning 1292 Truncated incorrect time value: '900:00:00'
2897+
SELECT MAKETIME(900,0,0.111111111);
2898+
MAKETIME(900,0,0.111111111)
2899+
838:59:59.999999
2900+
Warnings:
2901+
Warning 1292 Truncated incorrect time value: '900:00:00'
2902+
SELECT MAKETIME(900,0,EXP(1));
2903+
MAKETIME(900,0,EXP(1))
2904+
838:59:59.999999
2905+
Warnings:
2906+
Warning 1292 Truncated incorrect time value: '900:00:02'
2907+
SELECT MAKETIME(-900,0,0);
2908+
MAKETIME(-900,0,0)
2909+
-838:59:59
2910+
Warnings:
2911+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2912+
SELECT MAKETIME(-900,0,0.1);
2913+
MAKETIME(-900,0,0.1)
2914+
-838:59:59.9
2915+
Warnings:
2916+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2917+
SELECT MAKETIME(-900,0,0.11);
2918+
MAKETIME(-900,0,0.11)
2919+
-838:59:59.99
2920+
Warnings:
2921+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2922+
SELECT MAKETIME(-900,0,0.111);
2923+
MAKETIME(-900,0,0.111)
2924+
-838:59:59.999
2925+
Warnings:
2926+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2927+
SELECT MAKETIME(-900,0,0.1111);
2928+
MAKETIME(-900,0,0.1111)
2929+
-838:59:59.9999
2930+
Warnings:
2931+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2932+
SELECT MAKETIME(-900,0,0.11111);
2933+
MAKETIME(-900,0,0.11111)
2934+
-838:59:59.99999
2935+
Warnings:
2936+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2937+
SELECT MAKETIME(-900,0,0.111111);
2938+
MAKETIME(-900,0,0.111111)
2939+
-838:59:59.999999
2940+
Warnings:
2941+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2942+
SELECT MAKETIME(-900,0,0.1111111);
2943+
MAKETIME(-900,0,0.1111111)
2944+
-838:59:59.999999
2945+
Warnings:
2946+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2947+
SELECT MAKETIME(-900,0,0.11111111);
2948+
MAKETIME(-900,0,0.11111111)
2949+
-838:59:59.999999
2950+
Warnings:
2951+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2952+
SELECT MAKETIME(-900,0,0.111111111);
2953+
MAKETIME(-900,0,0.111111111)
2954+
-838:59:59.999999
2955+
Warnings:
2956+
Warning 1292 Truncated incorrect time value: '-900:00:00'
2957+
SELECT MAKETIME(-900,0,EXP(1));
2958+
MAKETIME(-900,0,EXP(1))
2959+
-838:59:59.999999
2960+
Warnings:
2961+
Warning 1292 Truncated incorrect time value: '-900:00:02'
2962+
#
28052963
# End of 5.5 tests
28062964
#
28072965
#

mysql-test/r/grant.result

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,6 +2577,35 @@ foo@localhost foo@127.0.0.1
25772577
# Clean-up
25782578
DROP USER foo@'127.0.0.1';
25792579
# End of Bug#12766319
2580+
create user foo@localhost;
2581+
create database foodb;
2582+
grant create routine on foodb.* to foo@localhost;
2583+
create procedure fooproc() select 'i am fooproc';
2584+
show grants;
2585+
Grants for foo@localhost
2586+
GRANT USAGE ON *.* TO 'foo'@'localhost'
2587+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
2588+
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost'
2589+
rename table mysql.procs_priv to mysql.procs_priv1;
2590+
flush privileges;
2591+
show grants for foo@localhost;
2592+
Grants for foo@localhost
2593+
GRANT USAGE ON *.* TO 'foo'@'localhost'
2594+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
2595+
rename table mysql.procs_priv1 to mysql.procs_priv;
2596+
show grants for foo@localhost;
2597+
Grants for foo@localhost
2598+
GRANT USAGE ON *.* TO 'foo'@'localhost'
2599+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
2600+
flush privileges;
2601+
show grants for foo@localhost;
2602+
Grants for foo@localhost
2603+
GRANT USAGE ON *.* TO 'foo'@'localhost'
2604+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
2605+
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost'
2606+
drop user foo@localhost;
2607+
drop procedure fooproc;
2608+
drop database foodb;
25802609
#
25812610
# Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS
25822611
# DATABASE SECURITY

mysql-test/r/sp-security.result

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,29 @@ SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
628628
# Connection default
629629
DROP USER user2@localhost;
630630
DROP DATABASE db1;
631+
create user foo@local_ost;
632+
create user foo@`local\_ost`;
633+
update mysql.user set plugin='foobar' where host='local\\_ost';
634+
flush privileges;
635+
create database foodb;
636+
grant create routine on foodb.* to foo@local_ost;
637+
select user(), current_user();
638+
user() current_user()
639+
foo@localhost foo@local_ost
640+
show grants;
641+
Grants for foo@local_ost
642+
GRANT USAGE ON *.* TO 'foo'@'local_ost'
643+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'local_ost'
644+
create procedure fooproc() select 'i am fooproc';
645+
show grants;
646+
Grants for foo@local_ost
647+
GRANT USAGE ON *.* TO 'foo'@'local_ost'
648+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'local_ost'
649+
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'local_ost'
650+
drop user foo@local_ost;
651+
drop user foo@`local\_ost`;
652+
drop procedure fooproc;
653+
drop database foodb;
631654
#
632655
# Test for bug#12602983 - User without privilege on routine can discover
633656
# its existence by executing "select non_existing_func();" or by

mysql-test/r/type_float.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,42 @@ select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo;
448448
foo
449449
0
450450
#
451+
# MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
452+
#
453+
SELECT LEFT('a',EXP(50));
454+
LEFT('a',EXP(50))
455+
a
456+
SELECT LEFT('a', COALESCE(1e30));
457+
LEFT('a', COALESCE(1e30))
458+
a
459+
CREATE TABLE t1 (a FLOAT);
460+
INSERT INTO t1 VALUES (1e30);
461+
SELECT LEFT('a',a), LEFT('a',1e30) FROM t1;
462+
LEFT('a',a) LEFT('a',1e30)
463+
a a
464+
DROP TABLE t1;
465+
PREPARE stmt FROM 'SELECT LEFT(111,?)';
466+
SET @a=1e30;
467+
EXECUTE stmt USING @a;
468+
LEFT(111,?)
469+
111
470+
DEALLOCATE PREPARE stmt;
471+
CREATE TABLE t1 (a INT);
472+
INSERT INTO t1 VALUES (1),(2),(3);
473+
SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1));
474+
LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1))
475+
a
476+
DROP TABLE t1;
477+
CREATE TABLE t1 (a DOUBLE);
478+
INSERT INTO t1 VALUES (1e30),(0);
479+
SELECT LEFT('a', SUM(a)) FROM t1;
480+
LEFT('a', SUM(a))
481+
a
482+
SELECT LEFT('a', AVG(a)) FROM t1;
483+
LEFT('a', AVG(a))
484+
a
485+
DROP TABLE t1;
486+
#
451487
# Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265
452488
# (WARN_DATA_TRUNCATED)
453489
#
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT);
2+
INSERT INTO t1 VALUES (1,10),(2,20);
3+
CREATE TABLE t2 (b INT) PARTITION BY KEY (b) PARTITIONS 2;
4+
INSERT INTO t2 VALUES (1),(2);
5+
DELETE t2 FROM t2 WHERE b BETWEEN 5 AND 9;
6+
UPDATE t2 JOIN t1 SET b = 5;
7+
DROP TABLE t1, t2;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--source include/have_partition.inc
2+
3+
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT);
4+
INSERT INTO t1 VALUES (1,10),(2,20);
5+
6+
CREATE TABLE t2 (b INT) PARTITION BY KEY (b) PARTITIONS 2;
7+
INSERT INTO t2 VALUES (1),(2);
8+
9+
DELETE t2 FROM t2 WHERE b BETWEEN 5 AND 9;
10+
UPDATE t2 JOIN t1 SET b = 5;
11+
12+
DROP TABLE t1, t2;

mysql-test/t/create_or_replace.test

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,3 +421,24 @@ UNLOCK TABLES;
421421

422422
DROP FUNCTION f1;
423423
DROP TABLE t1;
424+
425+
426+
--echo #
427+
--echo # MDEV-14410 - Assertion `table->pos_in_locked_tables == __null ||
428+
--echo # table->pos_in_locked_tables->table == table' failed in
429+
--echo # mark_used_tables_as_free_for_reuse
430+
--echo #
431+
CREATE TABLE t1 (a INT);
432+
CREATE TABLE t2 (b INT);
433+
CREATE TABLE t3 (c INT);
434+
435+
CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t1 VALUES ();
436+
CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW INSERT INTO t3 SELECT * FROM t1;
437+
438+
LOCK TABLE t1 WRITE, t2 WRITE;
439+
CREATE OR REPLACE TABLE t1 (i INT);
440+
UNLOCK TABLES;
441+
INSERT INTO t2 VALUES (1);
442+
443+
# Cleanup
444+
DROP TABLE t1, t2, t3;

0 commit comments

Comments
 (0)