Skip to content

Commit 7ae6ef5

Browse files
committed
Merge branch '10.5' into 10.6
2 parents a4482cd + b5569b6 commit 7ae6ef5

File tree

12 files changed

+124
-116
lines changed

12 files changed

+124
-116
lines changed

cmake/pcre.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ MACRO(BUNDLE_PCRE2)
4343
ExternalProject_Add(
4444
pcre2
4545
PREFIX "${dir}"
46-
URL "http://ftp.pcre.org/pub/pcre/pcre2-10.36.zip"
47-
URL_MD5 ba9e743af42aac5642f7504b12af4116
46+
URL "http://ftp.pcre.org/pub/pcre/pcre2-10.37.zip"
47+
URL_MD5 8c1699a725d4b28410adf4b964ebbcb7
4848
INSTALL_COMMAND ""
4949
CMAKE_ARGS
5050
"-DPCRE2_BUILD_TESTS=OFF"

mysql-test/main/processlist_notembedded.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2828
Warnings:
2929
Note 1003 select sleep(100000)
3030
KILL QUERY $con_id;
31+
disconnect con1;
3132
#
3233
# End of 10.2 tests
3334
#

mysql-test/main/processlist_notembedded.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
source include/have_debug.inc;
21
source include/have_debug_sync.inc;
32
source include/not_embedded.inc;
43
source include/count_sessions.inc;
@@ -37,8 +36,6 @@ connection default;
3736

3837
SET DEBUG_SYNC = 'RESET';
3938

40-
source include/wait_until_count_sessions.inc;
41-
4239
--echo #
4340
--echo # End of 5.5 tests
4441
--echo #
@@ -52,8 +49,12 @@ source include/wait_until_count_sessions.inc;
5249
--send select sleep(100000)
5350

5451
--connection default
52+
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist where state='User sleep';
53+
source include/wait_condition.inc;
5554
evalp SHOW EXPLAIN FOR $con_id;
5655
evalp KILL QUERY $con_id;
56+
disconnect con1;
57+
source include/wait_until_count_sessions.inc;
5758

5859
--echo #
5960
--echo # End of 10.2 tests

mysql-test/suite/gcol/inc/gcol_partition.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,15 @@ CREATE TABLE t1 (
169169
INSERT INTO t1 () VALUES (),();
170170
UPDATE t1 SET a = 0 WHERE b IS NULL ORDER BY pk;
171171
DROP TABLE t1;
172+
173+
--echo #
174+
--echo # MDEV-26220 Server crashes with indexed by prefix virtual column
175+
--echo #
176+
177+
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, b CHAR(20), c CHAR(20) AS (b),
178+
KEY (c(10),a)) PARTITION BY HASH(pk);
179+
INSERT INTO t1 (pk,a,b) VALUES (1,10,'foo'),(2,11,'baz');
180+
SELECT a FROM t1;
181+
182+
# Cleanup
183+
DROP TABLE t1;

mysql-test/suite/gcol/r/gcol_partition_innodb.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,17 @@ INSERT INTO t1 () VALUES (),();
104104
UPDATE t1 SET a = 0 WHERE b IS NULL ORDER BY pk;
105105
DROP TABLE t1;
106106
#
107+
# MDEV-26220 Server crashes with indexed by prefix virtual column
108+
#
109+
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, b CHAR(20), c CHAR(20) AS (b),
110+
KEY (c(10),a)) PARTITION BY HASH(pk);
111+
INSERT INTO t1 (pk,a,b) VALUES (1,10,'foo'),(2,11,'baz');
112+
SELECT a FROM t1;
113+
a
114+
11
115+
10
116+
DROP TABLE t1;
117+
#
107118
# MDEV-16980 Wrongly set tablename len while opening the
108119
# table for purge thread
109120
#

mysql-test/suite/gcol/r/gcol_partition_myisam.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ KEY (b,d)
101101
INSERT INTO t1 () VALUES (),();
102102
UPDATE t1 SET a = 0 WHERE b IS NULL ORDER BY pk;
103103
DROP TABLE t1;
104+
#
105+
# MDEV-26220 Server crashes with indexed by prefix virtual column
106+
#
107+
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, b CHAR(20), c CHAR(20) AS (b),
108+
KEY (c(10),a)) PARTITION BY HASH(pk);
109+
INSERT INTO t1 (pk,a,b) VALUES (1,10,'foo'),(2,11,'baz');
110+
SELECT a FROM t1;
111+
a
112+
11
113+
10
114+
DROP TABLE t1;
104115
DROP VIEW IF EXISTS v1,v2;
105116
DROP TABLE IF EXISTS t1,t2,t3;
106117
DROP PROCEDURE IF EXISTS p1;

mysql-test/suite/gcol/r/innodb_virtual_index.result

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,17 @@ Table Op Msg_type Msg_text
296296
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
297297
test.t1 optimize status OK
298298
DROP TABLE t1;
299+
#
300+
# MDEV-20154 Assertion `len <= col->len || ((col->mtype) == 5
301+
# || (col->mtype) == 14)' failed in row_merge_buf_add
302+
#
303+
CREATE TABLE t1 (
304+
a VARCHAR(2500),
305+
b VARCHAR(2499) AS (a) VIRTUAL
306+
) ENGINE=InnoDB;
307+
INSERT INTO t1 (a) VALUES ('foo');
308+
ALTER TABLE t1 MODIFY a VARCHAR(2600), ALGORITHM=INPLACE;
309+
ALTER TABLE t1 ADD KEY (b), ALGORITHM=INPLACE;
310+
# Cleanup
311+
DROP TABLE t1;
312+
# End of 10.2 tests

mysql-test/suite/gcol/t/innodb_virtual_index.test

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,23 @@ CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(3),
321321
INSERT INTO t1 (id,a) VALUES (1,'foo');
322322
OPTIMIZE TABLE t1;
323323
DROP TABLE t1;
324+
325+
--echo #
326+
--echo # MDEV-20154 Assertion `len <= col->len || ((col->mtype) == 5
327+
--echo # || (col->mtype) == 14)' failed in row_merge_buf_add
328+
--echo #
329+
330+
CREATE TABLE t1 (
331+
a VARCHAR(2500),
332+
b VARCHAR(2499) AS (a) VIRTUAL
333+
) ENGINE=InnoDB;
334+
INSERT INTO t1 (a) VALUES ('foo');
335+
336+
ALTER TABLE t1 MODIFY a VARCHAR(2600), ALGORITHM=INPLACE;
337+
ALTER TABLE t1 ADD KEY (b), ALGORITHM=INPLACE;
338+
339+
--echo # Cleanup
340+
DROP TABLE t1;
341+
342+
--echo # End of 10.2 tests
343+

sql/table.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4185,6 +4185,21 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
41854185

41864186
/* Update to use trigger fields */
41874187
switch_defaults_to_nullable_trigger_fields(outparam);
4188+
4189+
for (uint k= 0; k < share->keys; k++)
4190+
{
4191+
KEY &key_info= outparam->key_info[k];
4192+
uint parts = (share->use_ext_keys ? key_info.ext_key_parts :
4193+
key_info.user_defined_key_parts);
4194+
for (uint p= 0; p < parts; p++)
4195+
{
4196+
KEY_PART_INFO &kp= key_info.key_part[p];
4197+
if (kp.field != outparam->field[kp.fieldnr - 1])
4198+
{
4199+
kp.field->vcol_info = outparam->field[kp.fieldnr - 1]->vcol_info;
4200+
}
4201+
}
4202+
}
41884203
}
41894204

41904205
#ifdef WITH_PARTITION_STORAGE_ENGINE

storage/innobase/fts/fts0fts.cc

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6109,58 +6109,3 @@ fts_init_index(
61096109
dict_sys.mutex_unlock();
61106110
}
61116111
}
6112-
6113-
/** Check if the all the auxillary tables associated with FTS index are in
6114-
consistent state. For now consistency is check only by ensuring
6115-
index->page_no != FIL_NULL
6116-
@param[out] base_table table has host fts index
6117-
@param[in,out] trx trx handler */
6118-
void
6119-
fts_check_corrupt(
6120-
dict_table_t* base_table,
6121-
trx_t* trx)
6122-
{
6123-
bool sane = true;
6124-
fts_table_t fts_table;
6125-
6126-
/* Iterate over the common table and check for their sanity. */
6127-
FTS_INIT_FTS_TABLE(&fts_table, NULL, FTS_COMMON_TABLE, base_table);
6128-
6129-
for (ulint i = 0; fts_common_tables[i] != NULL && sane; ++i) {
6130-
6131-
char table_name[MAX_FULL_NAME_LEN];
6132-
6133-
fts_table.suffix = fts_common_tables[i];
6134-
fts_get_table_name(&fts_table, table_name);
6135-
6136-
dict_table_t* aux_table = dict_table_open_on_name(
6137-
table_name, true, FALSE, DICT_ERR_IGNORE_NONE);
6138-
6139-
if (aux_table == NULL) {
6140-
dict_set_corrupted(
6141-
dict_table_get_first_index(base_table),
6142-
trx, "FTS_SANITY_CHECK");
6143-
ut_ad(base_table->corrupted == TRUE);
6144-
sane = false;
6145-
continue;
6146-
}
6147-
6148-
for (dict_index_t* aux_table_index =
6149-
UT_LIST_GET_FIRST(aux_table->indexes);
6150-
aux_table_index != NULL;
6151-
aux_table_index =
6152-
UT_LIST_GET_NEXT(indexes, aux_table_index)) {
6153-
6154-
/* Check if auxillary table needed for FTS is sane. */
6155-
if (aux_table_index->page == FIL_NULL) {
6156-
dict_set_corrupted(
6157-
dict_table_get_first_index(base_table),
6158-
trx, "FTS_SANITY_CHECK");
6159-
ut_ad(base_table->corrupted == TRUE);
6160-
sane = false;
6161-
}
6162-
}
6163-
6164-
dict_table_close(aux_table, FALSE, FALSE);
6165-
}
6166-
}

0 commit comments

Comments
 (0)