Commit feb8004b authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.5 into 10.6

parents 7b891008 52b32c60
...@@ -177,8 +177,20 @@ IF(MSVC) ...@@ -177,8 +177,20 @@ IF(MSVC)
IF((NOT "${${flag}}" MATCHES "/Zi") AND (NOT "${${flag}}" MATCHES "/Z7")) IF((NOT "${${flag}}" MATCHES "/Zi") AND (NOT "${${flag}}" MATCHES "/Z7"))
STRING(APPEND ${flag} " /Zi") STRING(APPEND ${flag} " /Zi")
ENDIF() ENDIF()
# Remove inlining flags, added by CMake, if any.
# Compiler default is fine.
STRING(REGEX REPLACE "/Ob[0-3]" "" "${flag}" "${${flag}}" )
ENDFOREACH() ENDFOREACH()
# Allow to overwrite the inlining flag
SET(MSVC_INLINE "" CACHE STRING
"MSVC Inlining option, either empty, or one of /Ob0,/Ob1,/Ob2,/Ob3")
IF(MSVC_INLINE MATCHES "/Ob[0-3]")
ADD_COMPILE_OPTIONS(${MSVC_INLINE})
ELSEIF(NOT(MSVC_INLINE STREQUAL ""))
MESSAGE(FATAL_ERROR "Invalid option for MSVC_INLINE")
ENDIF()
IF(WITH_ASAN OR WITH_UBSAN) IF(WITH_ASAN OR WITH_UBSAN)
# Workaround something Linux specific # Workaround something Linux specific
SET(SECURITY_HARDENED 0 CACHE INTERNAL "" FORCE) SET(SECURITY_HARDENED 0 CACHE INTERNAL "" FORCE)
......
connect prevent_purge,localhost,root,,;
start transaction with consistent snapshot;
connection default;
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
UPDATE t1 SET col_text='';
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
connect con1,localhost,root,,;
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
BEGIN;
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
connection default;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
disconnect con1;
disconnect prevent_purge;
DROP TABLE t1;
--source include/innodb_row_format.inc
--source include/count_sessions.inc
--connect(prevent_purge,localhost,root,,)
start transaction with consistent snapshot;
--connection default
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
UPDATE t1 SET col_text='';
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
--connect(con1,localhost,root,,)
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
BEGIN;
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
--connection default
# If the bug is not fixed, CHECK TABLE will complain about wrong secondary index
# rows count
CHECK TABLE t1;
--disconnect con1
--disconnect prevent_purge
DROP TABLE t1;
--source include/wait_until_count_sessions.inc
...@@ -12,3 +12,4 @@ ...@@ -12,3 +12,4 @@
rtree_concurrent_srch : MDEV-15284 COUNT(*) mismatch rtree_concurrent_srch : MDEV-15284 COUNT(*) mismatch
rtree_recovery : MDEV-15284 COUNT(*) mismatch rtree_recovery : MDEV-15284 COUNT(*) mismatch
rtree_compress2 : MDEV-16269 CHECK TABLE reports wrong count
...@@ -357,11 +357,16 @@ row_sel_sec_rec_is_for_clust_rec( ...@@ -357,11 +357,16 @@ row_sel_sec_rec_is_for_clust_rec(
} }
len = clust_len; len = clust_len;
ulint prefix_len = ifield->prefix_len;
if (rec_offs_nth_extern(clust_offs, clust_pos)) { if (rec_offs_nth_extern(clust_offs, clust_pos)) {
/* BLOB can contain prefix. */
len -= BTR_EXTERN_FIELD_REF_SIZE; len -= BTR_EXTERN_FIELD_REF_SIZE;
if (!len) {
goto compare_blobs;
}
} }
if (ulint prefix_len = ifield->prefix_len) { if (prefix_len) {
len = dtype_get_at_most_n_mbchars( len = dtype_get_at_most_n_mbchars(
col->prtype, col->mbminlen, col->prtype, col->mbminlen,
col->mbmaxlen, prefix_len, len, col->mbmaxlen, prefix_len, len,
...@@ -374,6 +379,7 @@ row_sel_sec_rec_is_for_clust_rec( ...@@ -374,6 +379,7 @@ row_sel_sec_rec_is_for_clust_rec(
check_for_blob: check_for_blob:
if (rec_offs_nth_extern(clust_offs, if (rec_offs_nth_extern(clust_offs,
clust_pos)) { clust_pos)) {
compare_blobs:
if (!row_sel_sec_rec_is_for_blob( if (!row_sel_sec_rec_is_for_blob(
col->mtype, col->prtype, col->mtype, col->prtype,
col->mbminlen, col->mbminlen,
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#include <pthread_np.h> #include <pthread_np.h>
#endif #endif
#if defined(HAVE_INTEGER_PTHREAD_SELF)
#include <cstdint>
#endif
typedef pthread_key_t thread_local_key_t; typedef pthread_key_t thread_local_key_t;
typedef pthread_t my_thread_handle; typedef pthread_t my_thread_handle;
typedef pthread_attr_t my_thread_attr_t; typedef pthread_attr_t my_thread_attr_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment