Skip to content

Commit c425d93

Browse files
committed
Merge 10.2 into 10.3
except commit 1288dff
2 parents e3a2579 + 14a18d7 commit c425d93

16 files changed

+362
-199
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
518518
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
519519
)
520520

521-
INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY
522-
EXCEPTIONS-CLIENT COMPONENT Readme)
521+
INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY COMPONENT Readme)
523522

524523
# MDEV-6526 these files are not installed anymore
525524
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC

EXCEPTIONS-CLIENT

Lines changed: 0 additions & 136 deletions
This file was deleted.

mysql-test/suite/innodb/r/foreign_key.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,4 +800,15 @@ ERROR 23000: Duplicate entry '10' for key 'ind9'
800800
SET FOREIGN_KEY_CHECKS= 0;
801801
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (pk);
802802
DROP TABLE t1;
803+
SET FOREIGN_KEY_CHECKS= 1;
804+
#
805+
# MDEV-23455 Hangs + Sig11 in unknown location(s) due to single complex FK query
806+
#
807+
Parsing foreign keys 1...
808+
ERROR HY000: Can't create table `test`.`t0` (errno: 150 "Foreign key constraint is incorrectly formed")
809+
Parsing foreign keys 2...
810+
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
811+
Parsing foreign keys 3...
812+
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
813+
Parsing foreign keys 4...
803814
# End of 10.2 tests
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# MDEV-25459 MVCC read from index on CHAR or VARCHAR wrongly omits rows
3+
#
4+
CREATE TABLE t1 (
5+
pk int PRIMARY KEY, c varchar(255) UNIQUE,
6+
d char(255), e varchar(255), f char(255), g char(255)
7+
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARACTER SET ucs2;
8+
INSERT INTO t1 VALUES
9+
(1,REPEAT('c',248),REPEAT('a',106),REPEAT('b',220),REPEAT('x',14),'');
10+
BEGIN;
11+
UPDATE t1 SET c=REPEAT('d',170);
12+
connect con1,localhost,root,,;
13+
SELECT pk FROM t1 FORCE INDEX (c);
14+
pk
15+
1
16+
connection default;
17+
COMMIT;
18+
connection con1;
19+
SELECT pk FROM t1 FORCE INDEX (c);
20+
pk
21+
1
22+
disconnect con1;
23+
connection default;
24+
DROP TABLE t1;

mysql-test/suite/innodb/t/foreign_key.test

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,45 @@ ALTER TABLE t1 ADD UNIQUE INDEX ind9 (b), LOCK=SHARED;
782782
SET FOREIGN_KEY_CHECKS= 0;
783783
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (pk);
784784
DROP TABLE t1;
785+
SET FOREIGN_KEY_CHECKS= 1;
786+
787+
--echo #
788+
--echo # MDEV-23455 Hangs + Sig11 in unknown location(s) due to single complex FK query
789+
--echo #
790+
let $constr_prefix= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
791+
let $fk_ref= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
792+
let $fk_field= yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy;
793+
let $constr_count= 200; # each 100 constrs is 1 sec of test execution
794+
let $i= 0;
795+
796+
while ($i < $constr_count)
797+
{
798+
let $p= $constr_prefix$i;
799+
let $constr= CONSTRAINT $p FOREIGN KEY ($fk_field) REFERENCES t1($fk_ref) ON UPDATE SET NULL;
800+
if ($i)
801+
{
802+
let $constrs= $constrs, $constr;
803+
}
804+
if (!$i)
805+
{
806+
let $constrs= $constr;
807+
}
808+
inc $i;
809+
}
810+
--disable_query_log
811+
--echo Parsing foreign keys 1...
812+
--error ER_CANT_CREATE_TABLE
813+
eval create table t0($fk_field int, $constrs) engine innodb;
814+
--echo Parsing foreign keys 2...
815+
--error ER_CANT_CREATE_TABLE
816+
eval create table t1($fk_field int, $constrs) engine innodb;
817+
--echo Parsing foreign keys 3...
818+
--error ER_CANT_CREATE_TABLE
819+
eval create table t1($fk_ref int, $fk_field int, $constrs) engine innodb;
820+
--echo Parsing foreign keys 4...
821+
eval create table t1($fk_ref int primary key, $fk_field int, $constrs) engine innodb;
822+
drop table t1;
823+
--enable_query_log
785824

786825
--echo # End of 10.2 tests
787826

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--source include/innodb_page_size_small.inc
2+
3+
--echo #
4+
--echo # MDEV-25459 MVCC read from index on CHAR or VARCHAR wrongly omits rows
5+
--echo #
6+
7+
CREATE TABLE t1 (
8+
pk int PRIMARY KEY, c varchar(255) UNIQUE,
9+
d char(255), e varchar(255), f char(255), g char(255)
10+
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARACTER SET ucs2;
11+
12+
INSERT INTO t1 VALUES
13+
(1,REPEAT('c',248),REPEAT('a',106),REPEAT('b',220),REPEAT('x',14),'');
14+
15+
BEGIN;
16+
UPDATE t1 SET c=REPEAT('d',170);
17+
18+
connect (con1,localhost,root,,);
19+
SELECT pk FROM t1 FORCE INDEX (c);
20+
connection default;
21+
COMMIT;
22+
connection con1;
23+
SELECT pk FROM t1 FORCE INDEX (c);
24+
disconnect con1;
25+
connection default;
26+
DROP TABLE t1;

mysql-test/suite/vcol/r/vcol_syntax.result

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,41 @@ t1 CREATE TABLE "t1" (
5050
)
5151
drop table t1;
5252
set session sql_mode=@OLD_SQL_MODE;
53+
#
54+
# MDEV-25091 CREATE TABLE: field references qualified by a wrong table name succeed
55+
#
56+
create table t2 (x int);
57+
create table t1 (x int, y int generated always as (t2.x));
58+
ERROR 42S22: Unknown column '`t2`.`x`' in 'GENERATED ALWAYS'
59+
create table t1 (x int, y int check (y > t2.x));
60+
ERROR 42S22: Unknown column '`t2`.`x`' in 'CHECK'
61+
create table t1 (x int, y int default t2.x);
62+
ERROR 42S22: Unknown column '`t2`.`x`' in 'DEFAULT'
63+
create table t1 (x int, check (t2.x > 0));
64+
ERROR 42S22: Unknown column '`t2`.`x`' in 'CHECK'
65+
create table t1 (x int);
66+
alter table t1 add column y int generated always as (t2.x);
67+
ERROR 42S22: Unknown column '`t2`.`x`' in 'GENERATED ALWAYS'
68+
alter table t1 add column y int check (z > t2.x);
69+
ERROR 42S22: Unknown column '`t2`.`x`' in 'CHECK'
70+
alter table t1 add column y int default t2.x;
71+
ERROR 42S22: Unknown column '`t2`.`x`' in 'DEFAULT'
72+
alter table t1 add constraint check (t2.x > 0);
73+
ERROR 42S22: Unknown column '`t2`.`x`' in 'CHECK'
74+
create or replace table t1 (x int, y int generated always as (t1.x));
75+
create or replace table t1 (x int, y int check (y > t1.x));
76+
create or replace table t1 (x int, y int default t1.x);
77+
create or replace table t1 (x int, check (t1.x > 0));
78+
create or replace table t1 (x int, y int generated always as (test.t1.x));
79+
create or replace table t1 (x int, y int check (y > test.t1.x));
80+
create or replace table t1 (x int, y int default test.t1.x);
81+
create or replace table t1 (x int, check (test.t1.x > 0));
82+
drop tables t1, t2;
83+
create table t1 (x int, y int generated always as (test2.t1.x));
84+
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'GENERATED ALWAYS'
85+
create table t1 (x int, y int check (y > test2.t1.x));
86+
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'CHECK'
87+
create table t1 (x int, y int default test2.t1.x);
88+
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'DEFAULT'
89+
create table t1 (x int, check (test2.t1.x > 0));
90+
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'CHECK'

mysql-test/suite/vcol/t/vcol_syntax.test

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,47 @@ show create table t1;
2828
drop table t1;
2929
set session sql_mode=@OLD_SQL_MODE;
3030

31+
--echo #
32+
--echo # MDEV-25091 CREATE TABLE: field references qualified by a wrong table name succeed
33+
--echo #
34+
create table t2 (x int);
35+
36+
--error ER_BAD_FIELD_ERROR
37+
create table t1 (x int, y int generated always as (t2.x));
38+
--error ER_BAD_FIELD_ERROR
39+
create table t1 (x int, y int check (y > t2.x));
40+
--error ER_BAD_FIELD_ERROR
41+
create table t1 (x int, y int default t2.x);
42+
--error ER_BAD_FIELD_ERROR
43+
create table t1 (x int, check (t2.x > 0));
44+
45+
create table t1 (x int);
46+
--error ER_BAD_FIELD_ERROR
47+
alter table t1 add column y int generated always as (t2.x);
48+
--error ER_BAD_FIELD_ERROR
49+
alter table t1 add column y int check (z > t2.x);
50+
--error ER_BAD_FIELD_ERROR
51+
alter table t1 add column y int default t2.x;
52+
--error ER_BAD_FIELD_ERROR
53+
alter table t1 add constraint check (t2.x > 0);
54+
55+
create or replace table t1 (x int, y int generated always as (t1.x));
56+
create or replace table t1 (x int, y int check (y > t1.x));
57+
create or replace table t1 (x int, y int default t1.x);
58+
create or replace table t1 (x int, check (t1.x > 0));
59+
60+
create or replace table t1 (x int, y int generated always as (test.t1.x));
61+
create or replace table t1 (x int, y int check (y > test.t1.x));
62+
create or replace table t1 (x int, y int default test.t1.x);
63+
create or replace table t1 (x int, check (test.t1.x > 0));
64+
65+
drop tables t1, t2;
66+
67+
--error ER_BAD_FIELD_ERROR
68+
create table t1 (x int, y int generated always as (test2.t1.x));
69+
--error ER_BAD_FIELD_ERROR
70+
create table t1 (x int, y int check (y > test2.t1.x));
71+
--error ER_BAD_FIELD_ERROR
72+
create table t1 (x int, y int default test2.t1.x);
73+
--error ER_BAD_FIELD_ERROR
74+
create table t1 (x int, check (test2.t1.x > 0));

sql/gen_win_tzname_data.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
write-output "/* This file was generated using gen_win_tzname_data.ps1 */"
66
$xdoc = new-object System.Xml.XmlDocument
7+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
78
$xdoc.load("https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml")
89
$nodes = $xdoc.SelectNodes("//mapZone[@territory='001']") # use default territory (001)
910
foreach ($node in $nodes) {

0 commit comments

Comments
 (0)