Skip to content

Commit 669d8ff

Browse files
committed
Merge 11.6 into main
2 parents 9811d23 + a5b8053 commit 669d8ff

File tree

84 files changed

+1728
-1300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1728
-1300
lines changed

debian/autobake-deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ in
121121
replace_uring_with_aio
122122
fi
123123
;&
124-
"noble")
124+
"noble"|"oracular")
125125
# mariadb-plugin-rocksdb s390x not supported by us (yet)
126126
# ubuntu doesn't support mips64el yet, so keep this just
127127
# in case something changes.

extra/mariabackup/xtrabackup.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ static int prepare_export()
21142114
IF_WIN("\"","") "\"%s\" --mysqld \"%s\""
21152115
" --defaults-extra-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
21162116
" --innodb --innodb-fast-shutdown=0 --loose-partition"
2117-
" --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
2117+
" --innodb-buffer-pool-size=%llu"
21182118
" --console --skip-log-error --skip-log-bin --bootstrap %s< "
21192119
BOOTSTRAP_FILENAME IF_WIN("\"",""),
21202120
mariabackup_exe,
@@ -2128,7 +2128,7 @@ static int prepare_export()
21282128
IF_WIN("\"","") "\"%s\" --mysqld"
21292129
" --defaults-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
21302130
" --innodb --innodb-fast-shutdown=0 --loose-partition"
2131-
" --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
2131+
" --innodb-buffer-pool-size=%llu"
21322132
" --console --log-error= --skip-log-bin --bootstrap %s< "
21332133
BOOTSTRAP_FILENAME IF_WIN("\"",""),
21342134
mariabackup_exe,

mysql-test/main/func_time.result

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ now()-curdate()*1000000-curtime()
4848
select strcmp(current_timestamp(),concat(current_date()," ",current_time())) as exp;
4949
exp
5050
0
51-
select strcmp(localtime(),concat(current_date()," ",current_time())) as exp;
51+
select strcmp(localtime(),current_time()) as exp;
5252
exp
5353
0
5454
select strcmp(localtimestamp(),concat(current_date()," ",current_time())) as exp;
@@ -6397,3 +6397,32 @@ SET @@timestamp= DEFAULT;
63976397
#
63986398
# End of 10.5 tests
63996399
#
6400+
#
6401+
# Start of 11.6 tests
6402+
#
6403+
#
6404+
# MDEV-34829 LOCALTIME returns a wrong data type
6405+
#
6406+
SET timestamp=UNIX_TIMESTAMP('2024-08-28 14:47:00');
6407+
SELECT LOCALTIME;
6408+
LOCALTIME
6409+
14:47:00
6410+
EXPLAIN EXTENDED SELECT LOCALTIME;
6411+
id select_type table type possible_keys key key_len ref rows filtered Extra
6412+
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
6413+
Warnings:
6414+
Note 1003 select curtime() AS `LOCALTIME`
6415+
CREATE TABLE t1 AS SELECT LOCALTIME;
6416+
SHOW CREATE TABLE t1;
6417+
Table Create Table
6418+
t1 CREATE TABLE `t1` (
6419+
`LOCALTIME` time NOT NULL
6420+
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
6421+
SELECT * FROM t1;
6422+
LOCALTIME
6423+
14:47:00
6424+
DROP TABLE t1;
6425+
SET timestamp=DEFAULT;
6426+
#
6427+
# End of 11.6 tests
6428+
#

mysql-test/main/func_time.test

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ select sec_to_time(90011e-1), sec_to_time(1234567890123e30);
2525
select sec_to_time(1234567890123), sec_to_time('99999999999999999999999999999');
2626
select now()-curdate()*1000000-curtime();
2727
select strcmp(current_timestamp(),concat(current_date()," ",current_time())) as exp;
28-
select strcmp(localtime(),concat(current_date()," ",current_time())) as exp;
28+
select strcmp(localtime(),current_time()) as exp;
2929
select strcmp(localtimestamp(),concat(current_date()," ",current_time())) as exp;
3030
select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w") as exp;
3131
select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w")) as exp;
@@ -3249,3 +3249,24 @@ SET @@timestamp= DEFAULT;
32493249
--echo #
32503250
--echo # End of 10.5 tests
32513251
--echo #
3252+
3253+
--echo #
3254+
--echo # Start of 11.6 tests
3255+
--echo #
3256+
3257+
--echo #
3258+
--echo # MDEV-34829 LOCALTIME returns a wrong data type
3259+
--echo #
3260+
3261+
SET timestamp=UNIX_TIMESTAMP('2024-08-28 14:47:00');
3262+
SELECT LOCALTIME;
3263+
EXPLAIN EXTENDED SELECT LOCALTIME;
3264+
CREATE TABLE t1 AS SELECT LOCALTIME;
3265+
SHOW CREATE TABLE t1;
3266+
SELECT * FROM t1;
3267+
DROP TABLE t1;
3268+
SET timestamp=DEFAULT;
3269+
3270+
--echo #
3271+
--echo # End of 11.6 tests
3272+
--echo #

mysql-test/main/func_time_hires.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ utc_timestamp(1) 2010-12-31 22:01:01.1
1313
utc_time(2) 22:01:01.12
1414
current_time(3) 01:01:01.123
1515
current_timestamp(4) 2011-01-01 01:01:01.1234
16-
localtime(5) 2011-01-01 01:01:01.12345
16+
localtime(5) 01:01:01.12345
1717
localtimestamp(6) 2011-01-01 01:01:01.123456
1818
time_to_sec('12:34:56') 45296
1919
time_to_sec('12:34:56.789') 45296.789
@@ -45,7 +45,7 @@ t1 CREATE TABLE `t1` (
4545
`utc_time(2)` time(2) NOT NULL,
4646
`current_time(3)` time(3) NOT NULL,
4747
`current_timestamp(4)` datetime(4) NOT NULL,
48-
`localtime(5)` datetime(5) NOT NULL,
48+
`localtime(5)` time(5) NOT NULL,
4949
`localtimestamp(6)` datetime(6) NOT NULL,
5050
`time_to_sec(123456)` bigint(17) DEFAULT NULL,
5151
`time_to_sec('12:34:56.789')` decimal(19,3) DEFAULT NULL
@@ -60,7 +60,7 @@ utc_timestamp(1) 2010-12-31 22:01:01.1
6060
utc_time(2) 22:01:01.12
6161
current_time(3) 01:01:01.123
6262
current_timestamp(4) 2011-01-01 01:01:01.1234
63-
localtime(5) 2011-01-01 01:01:01.12345
63+
localtime(5) 01:01:01.12345
6464
localtimestamp(6) 2011-01-01 01:01:01.123456
6565
time_to_sec(123456) 45296
6666
time_to_sec('12:34:56.789') 45296.789

mysql-test/main/item_types.result

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,24 @@ SELECT * FROM v WHERE f = '10.5.20';
4242
f
4343
drop view v;
4444
#
45+
# MDEV-34785: Assertion failure in Item_func_or_sum::do_build_clone
46+
# (Item_func_not_all)
47+
#
48+
CREATE VIEW t AS SELECT 0 AS a;
49+
SELECT * FROM t WHERE a=ALL (SELECT 0);
50+
a
51+
0
52+
DROP VIEW t;
53+
#
54+
# MDEV-34833: Assertion failure in Item_float::do_build_clone
55+
# (Item_static_float_func)
56+
#
57+
CREATE VIEW v1 (f,f2) AS SELECT connection_id(),pi();
58+
CREATE TABLE t1 AS SELECT 1;
59+
SELECT * FROM v1 JOIN t1 ON f=f2;
60+
f f2 1
61+
DROP VIEW v1;
62+
DROP TABLE t1;
63+
#
4564
# End of 10.5 tests
4665
#

mysql-test/main/item_types.test

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,27 @@ CREATE VIEW v AS SELECT version() AS f;
4646
SELECT * FROM v WHERE f = '10.5.20';
4747
drop view v;
4848

49+
--echo #
50+
--echo # MDEV-34785: Assertion failure in Item_func_or_sum::do_build_clone
51+
--echo # (Item_func_not_all)
52+
--echo #
53+
54+
CREATE VIEW t AS SELECT 0 AS a;
55+
SELECT * FROM t WHERE a=ALL (SELECT 0);
56+
DROP VIEW t;
57+
58+
59+
--echo #
60+
--echo # MDEV-34833: Assertion failure in Item_float::do_build_clone
61+
--echo # (Item_static_float_func)
62+
--echo #
63+
64+
CREATE VIEW v1 (f,f2) AS SELECT connection_id(),pi();
65+
CREATE TABLE t1 AS SELECT 1;
66+
SELECT * FROM v1 JOIN t1 ON f=f2;
67+
DROP VIEW v1;
68+
DROP TABLE t1;
69+
4970
--echo #
5071
--echo # End of 10.5 tests
5172
--echo #

mysql-test/suite/binlog/r/binlog_unsafe.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2627,7 +2627,7 @@ a
26272627
16:46:40
26282628
1970-01-12 16:46:40
26292629
16:46:40
2630-
1970-01-12 16:46:40
2630+
16:46:40
26312631
1970-01-12 16:46:40
26322632
1970-01-12 16:46:40
26332633
1000000
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- alter_copy_bulk.result
2+
+++ alter_copy_bulk.result
3+
@@ -4,7 +4,7 @@
4+
INSERT INTO t1 SELECT repeat('b', 200), seq FROM seq_3_to_65536;
5+
ALTER TABLE t1 ALGORITHM=COPY, ADD INDEX(f2);
6+
ALTER TABLE t1 ALGORITHM=COPY, ADD PRIMARY KEY(f1(2));
7+
-ERROR 23000: Duplicate entry 'aa' for key 'PRIMARY'
8+
+ERROR 23000: Duplicate entry 'bb' for key 'PRIMARY'
9+
INSERT INTO t1 VALUES(repeat('a', 200), 1);
10+
ALTER TABLE t1 ALGORITHM=COPY, ADD UNIQUE KEY(f2);
11+
ERROR 23000: Duplicate entry '1' for key 'f2_2'
Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,50 @@
1-
SET @@alter_algorithm=COPY;
2-
Warnings:
3-
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
41
CREATE TABLE t1(f1 CHAR(200), f2 INT NOT NULL)engine=InnoDB;
52
INSERT INTO t1 SELECT repeat('a', 200), seq FROM seq_1_to_2;
6-
ALTER TABLE t1 FORCE;
3+
ALTER TABLE t1 ALGORITHM=COPY, FORCE;
74
INSERT INTO t1 SELECT repeat('b', 200), seq FROM seq_3_to_65536;
8-
ALTER TABLE t1 ADD INDEX(f2);
9-
ALTER TABLE t1 ADD PRIMARY KEY(f1(2));
10-
ERROR 23000: Duplicate entry 'aaaaaaaa' for key 'PRIMARY'
5+
ALTER TABLE t1 ALGORITHM=COPY, ADD INDEX(f2);
6+
ALTER TABLE t1 ALGORITHM=COPY, ADD PRIMARY KEY(f1(2));
7+
ERROR 23000: Duplicate entry 'aa' for key 'PRIMARY'
118
INSERT INTO t1 VALUES(repeat('a', 200), 1);
12-
ALTER TABLE t1 ADD UNIQUE KEY(f2);
9+
ALTER TABLE t1 ALGORITHM=COPY, ADD UNIQUE KEY(f2);
1310
ERROR 23000: Duplicate entry '1' for key 'f2_2'
1411
ALTER IGNORE TABLE t1 MODIFY f1 CHAR(200) NOT NULL;
1512
CREATE TABLE t2(f1 INT NOT NULL,
1613
FOREIGN KEY(f1) REFERENCES t1(f2))ENGINE=InnoDB;
1714
INSERT INTO t2 VALUES(1);
18-
ALTER TABLE t2 FORCE;
15+
ALTER TABLE t2 ALGORITHM=COPY, FORCE;
1916
DROP TABLE t2, t1;
2017
CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB PARTITION BY HASH(f1) PARTITIONS 2;
2118
INSERT INTO t1 VALUES(1, 1);
2219
INSERT INTO t1 SELECT seq, seq * 2 FROM seq_1_to_2;
23-
ALTER TABLE t1 FORCE;
20+
ALTER TABLE t1 ALGORITHM=COPY, FORCE;
2421
INSERT INTO t1 SELECT seq, seq * 2 FROM seq_3_to_65536;
25-
ALTER TABLE t1 ADD INDEX(f2);
22+
ALTER TABLE t1 ALGORITHM=COPY, ADD INDEX(f2);
2623
DROP TABLE t1;
24+
#
25+
# MDEV-34756 Validation of new foreign key skipped
26+
# if innodb_alter_copy_bulk=ON
27+
#
28+
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
29+
f2 INT NOT NULL)ENGINE=InnoDB;
30+
CREATE TABLE t2(f1 INT NOT NULL PRIMARY KEY,
31+
f2 INT NOT NULL)ENGINE=InnoDB;
32+
ALTER TABLE t2 ADD CONSTRAINT FOREIGN KEY(f1) REFERENCES t1(f1);
33+
affected rows: 0
34+
info: Records: 0 Duplicates: 0 Warnings: 0
35+
INSERT INTO t1 VALUES (1, 1);
36+
INSERT INTO t2 VALUES (1, 2);
37+
ALTER TABLE t2 ADD CONSTRAINT FOREIGN KEY(f2) REFERENCES t1(f1);
38+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`#sql-alter`, CONSTRAINT `#sql-alter_ibfk_2` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`))
39+
INSERT INTO t1 VALUES(3, 1);
40+
SET STATEMENT foreign_key_checks=0 FOR
41+
ALTER TABLE t2 ALGORITHM=COPY, ADD CONSTRAINT FOREIGN KEY(f2) REFERENCES t1(f1);
42+
affected rows: 1
43+
info: Records: 1 Duplicates: 0 Warnings: 0
44+
ALTER TABLE t1 ALGORITHM=COPY, FORCE;
45+
affected rows: 2
46+
info: Records: 2 Duplicates: 0 Warnings: 0
47+
ALTER TABLE t2 ALGORITHM=COPY, FORCE;
48+
affected rows: 1
49+
info: Records: 1 Duplicates: 0 Warnings: 0
50+
DROP TABLE t2, t1;

0 commit comments

Comments
 (0)