Skip to content

Commit feb8004

Browse files
committed
Merge 10.5 into 10.6
2 parents 7b89100 + 52b32c6 commit feb8004

File tree

6 files changed

+69
-1
lines changed

6 files changed

+69
-1
lines changed

cmake/os/Windows.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,20 @@ IF(MSVC)
177177
IF((NOT "${${flag}}" MATCHES "/Zi") AND (NOT "${${flag}}" MATCHES "/Z7"))
178178
STRING(APPEND ${flag} " /Zi")
179179
ENDIF()
180+
# Remove inlining flags, added by CMake, if any.
181+
# Compiler default is fine.
182+
STRING(REGEX REPLACE "/Ob[0-3]" "" "${flag}" "${${flag}}" )
180183
ENDFOREACH()
181184

185+
# Allow to overwrite the inlining flag
186+
SET(MSVC_INLINE "" CACHE STRING
187+
"MSVC Inlining option, either empty, or one of /Ob0,/Ob1,/Ob2,/Ob3")
188+
IF(MSVC_INLINE MATCHES "/Ob[0-3]")
189+
ADD_COMPILE_OPTIONS(${MSVC_INLINE})
190+
ELSEIF(NOT(MSVC_INLINE STREQUAL ""))
191+
MESSAGE(FATAL_ERROR "Invalid option for MSVC_INLINE")
192+
ENDIF()
193+
182194
IF(WITH_ASAN OR WITH_UBSAN)
183195
# Workaround something Linux specific
184196
SET(SECURITY_HARDENED 0 CACHE INTERNAL "" FORCE)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
connect prevent_purge,localhost,root,,;
2+
start transaction with consistent snapshot;
3+
connection default;
4+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
5+
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
6+
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
7+
UPDATE t1 SET col_text='';
8+
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
9+
connect con1,localhost,root,,;
10+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
11+
BEGIN;
12+
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
13+
connection default;
14+
CHECK TABLE t1;
15+
Table Op Msg_type Msg_text
16+
test.t1 check status OK
17+
disconnect con1;
18+
disconnect prevent_purge;
19+
DROP TABLE t1;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--source include/innodb_row_format.inc
2+
--source include/count_sessions.inc
3+
--connect(prevent_purge,localhost,root,,)
4+
start transaction with consistent snapshot;
5+
6+
--connection default
7+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
8+
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
9+
10+
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
11+
UPDATE t1 SET col_text='';
12+
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
13+
14+
--connect(con1,localhost,root,,)
15+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
16+
BEGIN;
17+
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
18+
19+
--connection default
20+
# If the bug is not fixed, CHECK TABLE will complain about wrong secondary index
21+
# rows count
22+
CHECK TABLE t1;
23+
--disconnect con1
24+
--disconnect prevent_purge
25+
DROP TABLE t1;
26+
--source include/wait_until_count_sessions.inc

mysql-test/suite/innodb_gis/disabled.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212

1313
rtree_concurrent_srch : MDEV-15284 COUNT(*) mismatch
1414
rtree_recovery : MDEV-15284 COUNT(*) mismatch
15+
rtree_compress2 : MDEV-16269 CHECK TABLE reports wrong count

storage/innobase/row/row0sel.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,16 @@ row_sel_sec_rec_is_for_clust_rec(
357357
}
358358

359359
len = clust_len;
360+
ulint prefix_len = ifield->prefix_len;
360361
if (rec_offs_nth_extern(clust_offs, clust_pos)) {
362+
/* BLOB can contain prefix. */
361363
len -= BTR_EXTERN_FIELD_REF_SIZE;
364+
if (!len) {
365+
goto compare_blobs;
366+
}
362367
}
363368

364-
if (ulint prefix_len = ifield->prefix_len) {
369+
if (prefix_len) {
365370
len = dtype_get_at_most_n_mbchars(
366371
col->prtype, col->mbminlen,
367372
col->mbmaxlen, prefix_len, len,
@@ -374,6 +379,7 @@ row_sel_sec_rec_is_for_clust_rec(
374379
check_for_blob:
375380
if (rec_offs_nth_extern(clust_offs,
376381
clust_pos)) {
382+
compare_blobs:
377383
if (!row_sel_sec_rec_is_for_blob(
378384
col->mtype, col->prtype,
379385
col->mbminlen,

storage/perfschema/my_thread.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#include <pthread_np.h>
1515
#endif
1616

17+
#if defined(HAVE_INTEGER_PTHREAD_SELF)
18+
#include <cstdint>
19+
#endif
20+
1721
typedef pthread_key_t thread_local_key_t;
1822
typedef pthread_t my_thread_handle;
1923
typedef pthread_attr_t my_thread_attr_t;

0 commit comments

Comments
 (0)