Commit 524b4a89 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.2 into 10.3

parents f7054ff5 d6d1a1fc
init:
# Install bison
- choco feature disable --name showDownloadProgress
- choco install -y winflexbison
- C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe --version
version: build-{build}~branch-{branch}
clone_depth: 1
......@@ -17,7 +23,7 @@ build_script:
- set BUILD_TYPE=MinSizeRel
- set GENERATOR=-GNinja
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO
- cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO
- set /A jobs=2*%NUMBER_OF_PROCESSORS%
- cmake -E time cmake --build . -j %jobs% --config %BUILD_TYPE% --target minbuild
......
/*
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2009, 2019, MariaDB Corporation.
Copyright (c) 2009, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -90,10 +90,14 @@ extern "C" {
#if defined(__WIN__)
#include <conio.h>
#else
#include <readline.h>
#if !defined(USE_LIBEDIT_INTERFACE)
#include <history.h>
#endif
# ifdef __APPLE__
# include <editline/readline.h>
# else
# include <readline.h>
# if !defined(USE_LIBEDIT_INTERFACE)
# include <history.h>
# endif
# endif
#define HAVE_READLINE
#define USE_POPEN
#endif
......
......@@ -48,21 +48,82 @@ SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
SET(CPACK_RPM_shared_PACKAGE_VENDOR "MariaDB Corporation Ab")
SET(CPACK_RPM_shared_PACKAGE_LICENSE "LGPLv2.1")
SET(CPACK_RPM_shared_PACKAGE_SUMMARY "LGPL MariaDB client library")
SET(CPACK_RPM_shared_PACKAGE_DESCRIPTION "
This is LGPL MariaDB client library that can be used to connect to MySQL
# Set default description for packages
SET(CPACK_RPM_PACKAGE_DESCRIPTION "MariaDB: a very fast and robust SQL database server
It is GPL v2 licensed, which means you can use the it free of charge under the
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
MariaDB documentation can be found at https://mariadb.com/kb
MariaDB bug reports should be submitted through https://jira.mariadb.org")
# Packages with default description
SET(CPACK_RPM_client_PACKAGE_SUMMARY "MariaDB database client binaries")
SET(CPACK_RPM_common_PACKAGE_SUMMARY "MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)")
SET(CPACK_RPM_compat_PACKAGE_SUMMARY "MariaDB database client library MySQL compat package")
SET(CPACK_RPM_devel_PACKAGE_SUMMARY "MariaDB database development files")
SET(CPACK_RPM_server_PACKAGE_SUMMARY "MariaDB database server binaries")
SET(CPACK_RPM_test_PACKAGE_SUMMARY "MariaDB database regression test suite")
# libmariadb3
SET(CPACK_RPM_shared_PACKAGE_SUMMARY "LGPL MariaDB database client library")
SET(CPACK_RPM_shared_PACKAGE_DESCRIPTION "This is LGPL MariaDB client library that can be used to connect to MySQL
or MariaDB.
This code is based on the LGPL libmysql client library from MySQL 3.23
and PHP's mysqlnd extension.
This product includes PHP software, freely available from
<http://www.php.net/software/>
")
http://www.php.net/software/")
# Summary and descriptions per package
SET(CPACK_RPM_backup_PACKAGE_SUMMARY "Backup tool for MariaDB server")
SET(CPACK_RPM_backup_PACKAGE_DESCRIPTION "Mariabackup is an open source tool provided by MariaDB
for performing physical online backups of InnoDB, Aria and MyISAM tables.
For InnoDB, “hot online” backups are possible.
It was originally forked from Percona XtraBackup 2.3.8.")
SET(CPACK_RPM_cassandra-engine_PACKAGE_SUMMARY "Cassandra storage engine for MariaDB")
SET(CPACK_RPM_cassandra-engine_PACKAGE_DESCRIPTION "The Cassandra Storage Engine allows access to data in a Cassandra cluster from
MariaDB, combining the best of SQL and no-SQL worlds. Cassandra SE (storage
engine) makes Cassandra's column family appear as a table in MariaDB that you
can insert to, update, and select from. You can write joins against this table,
it is possible to join data that's stored in MariaDB with data that's stored in
Cassandra.")
SET(CPACK_RPM_connect-engine_PACKAGE_SUMMARY "Connect storage engine for MariaDB")
SET(CPACK_RPM_connect-engine_PACKAGE_DESCRIPTION "Connect engine supports a number of file formats (dbf, xml, txt, bin, etc),
connections to ODBC tables and remote MySQL tables, as well as a number of
other interesting features.")
SET(CPACK_RPM_cracklib-password-check_PACKAGE_SUMMARY "CrackLib Password Validation Plugin for MariaDB")
SET(CPACK_RPM_cracklib-password-check_PACKAGE_DESCRIPTION "This password validation plugin uses cracklib to allow only
sufficiently secure (as defined by cracklib) user passwords in MariaDB.")
SET(CPACK_RPM_gssapi-server_PACKAGE_SUMMARY "GSSAPI authentication plugin for MariaDB server")
SET(CPACK_RPM_gssapi-server_PACKAGE_DESCRIPTION "The gssapi authentication plugin allows the user to authenticate with services
that use the Generic Security Services Application Program Interface (GSSAPI).
The gssapi authentication plugin is most often used for authenticating with Microsoft Active Directory.")
SET(CPACK_RPM_oqgraph-engine_PACKAGE_SUMMARY "OQGraph storage engine for MariaDB")
SET(CPACK_RPM_oqgraph-engine_PACKAGE_DESCRIPTION "The Open Query GRAPH computation engine, or OQGRAPH as the engine itself is called,
allows you to handle hierarchies (tree structures) and complex graphs
(nodes having many connections in several directions).
It is intended to be used for retrieving hierarchical information, such as those used for graphs,
routes or social relationships, in plain SQL.")
SET(CPACK_RPM_rocksdb-engine_PACKAGE_SUMMARY "RocksDB storage engine for MariaDB")
SET(CPACK_RPM_rocksdb-engine_PACKAGE_DESCRIPTION "The RocksDB storage engine is a high performance storage engine, aimed
at maximising storage efficiency while maintaining InnoDB-like performance.")
SET(CPACK_RPM_tokudb-engine_PACKAGE_SUMMARY "TokuDB storage engine for MariaDB")
SET(CPACK_RPM_tokudb-engine_PACKAGE_DESCRIPTION "The TokuDB storage engine is for use in high-performance and write-intensive
environments, offering increased compression and better performance based
on fractal indexes.")
SET(CPACK_RPM_SPEC_MORE_DEFINE "
%define mysql_vendor ${CPACK_PACKAGE_VENDOR}
......
......@@ -370,6 +370,7 @@ create_worker_threads(uint n)
thd)) {
msg("compress: pthread_create() failed: "
"errno = %d", errno);
pthread_mutex_unlock(&thd->ctrl_mutex);
goto err;
}
}
......@@ -386,6 +387,13 @@ create_worker_threads(uint n)
return threads;
err:
while (i > 0) {
comp_thread_ctxt_t *thd;
i--;
thd = threads + i;
pthread_mutex_unlock(&thd->ctrl_mutex);
}
my_free(threads);
return NULL;
}
......
......@@ -147,7 +147,8 @@ sub do_args($$$$$) {
my %vars = (
vardir => $::opt_vardir,
exe => $$exe,
args => join(' ', map { quote_from_mtr $_ } @$$args, '--loose-gdb'),
args => join(' ', map { quote_from_mtr $_ } @$$args,
'--loose-debug-gdb', '--loose-skip-stack-trace'),
input => $input,
script => "$::opt_vardir/tmp/${k}init.$type",
log => "$::opt_vardir/log/$type.$k",
......
This diff is collapsed.
......@@ -14,3 +14,35 @@ DROP TABLE t1;
--echo #
--echo # End of 5.5 tests
--echo #
--echo #
--echo # Start of 10.2 tests
--echo #
--echo #
--echo # MDEV-25610 Assertion `escape != -1' failed in Item_func_like::val_int
--echo #
SET NAMES cp850;
SELECT '' LIKE '' ESCAPE _cp850 0xFF;
DELIMITER $$;
BEGIN NOT ATOMIC
DECLARE ch INT DEFAULT 0x00;
DECLARE query TEXT DEFAULT 'SELECT _cp850'''' LIKE _cp850'''' ESCAPE _cp850 0xFF';
WHILE ch <= 0xFF DO
SET @query= REPLACE(query, 'FF', CONV(ch, 10, 16));
SELECT @query;
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET ch=ch+1;
END WHILE;
END;
$$
DELIMITER ;$$
--echo #
--echo # End of 10.2 tests
--echo #
#
# Start of 10.2 tests
#
#
# MDEV-25610 Assertion `escape != -1' failed in Item_func_like::val_int
#
SELECT _cp866'' LIKE _cp866'' ESCAPE _cp866 0xFF;
_cp866'' LIKE _cp866'' ESCAPE _cp866 0xFF
1
#
# End of 10.2 tests
#
--echo #
--echo # Start of 10.2 tests
--echo #
--echo #
--echo # MDEV-25610 Assertion `escape != -1' failed in Item_func_like::val_int
--echo #
SELECT _cp866'' LIKE _cp866'' ESCAPE _cp866 0xFF;
--echo #
--echo # End of 10.2 tests
--echo #
......@@ -4421,5 +4421,14 @@ DROP TABLE t1;
#
SET STORAGE_ENGINE=Default;
#
# MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV in row_merge_fts_doc_tokenize, stack smashing
#
SELECT HEX(WEIGHT_STRING(_tis620 'a\0b'));
HEX(WEIGHT_STRING(_tis620 'a\0b'))
610062
SELECT HEX(WEIGHT_STRING(_tis620 'a\0b' COLLATE tis620_thai_nopad_ci));
HEX(WEIGHT_STRING(_tis620 'a\0b' COLLATE tis620_thai_nopad_ci))
610062
#
# End of 10.2 tests
#
......@@ -209,6 +209,13 @@ let $coll='tis620_nopad_bin';
let $coll_pad='tis620_bin';
--source include/ctype_pad_all_engines.inc
--echo #
--echo # MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV in row_merge_fts_doc_tokenize, stack smashing
--echo #
SELECT HEX(WEIGHT_STRING(_tis620 'a\0b'));
SELECT HEX(WEIGHT_STRING(_tis620 'a\0b' COLLATE tis620_thai_nopad_ci));
--echo #
--echo # End of 10.2 tests
--echo #
......@@ -11256,6 +11256,17 @@ DROP TABLE kv;
DROP VIEW v1;
SET NAMES utf8;
#
# MDEV-24335 Unexpected question mark in the end of a TINYTEXT column
#
CREATE TABLE t1 (a TINYTEXT character set utf8);
INSERT IGNORE INTO t1 VALUES (REPEAT(_utf8 0xD184, 250));
Warnings:
Warning 1366 Incorrect string value: '\xD1\x84\xD1\x84\xD1\x84...' for column `test`.`t1`.`a` at row 1
SELECT LENGTH(a), CHAR_LENGTH(a), RIGHT(a,3) FROM t1;
LENGTH(a) CHAR_LENGTH(a) RIGHT(a,3)
254 127 ффф
DROP TABLE t1;
#
# End of 10.2 tests
#
#
......
......@@ -2183,6 +2183,15 @@ DROP TABLE kv;
DROP VIEW v1;
SET NAMES utf8;
--echo #
--echo # MDEV-24335 Unexpected question mark in the end of a TINYTEXT column
--echo #
CREATE TABLE t1 (a TINYTEXT character set utf8);
INSERT IGNORE INTO t1 VALUES (REPEAT(_utf8 0xD184, 250));
SELECT LENGTH(a), CHAR_LENGTH(a), RIGHT(a,3) FROM t1;
DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
......
......@@ -19,6 +19,7 @@ mysql/innodb_table_stats
mysql/transaction_registry
test/t1
test/t2
FLUSH TABLES t1,t2,t3 FOR EXPORT;
# t1 yes on expecting NOT FOUND
NOT FOUND /foobarsecret/ in t1.ibd
# t2 ... on expecting NOT FOUND
......@@ -27,6 +28,7 @@ NOT FOUND /tempsecret/ in t2.ibd
FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND
NOT FOUND /foobarsecret/ in ibdata1
UNLOCK TABLES;
# Now turn off encryption and wait for threads to decrypt everything
SET GLOBAL innodb_encrypt_tables = off;
# Wait max 10 min for key encryption threads to decrypt all spaces
......@@ -41,6 +43,7 @@ test/t3
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
NAME
test/t1
FLUSH TABLES t1,t2,t3 FOR EXPORT;
# t1 yes on expecting NOT FOUND
NOT FOUND /foobarsecret/ in t1.ibd
# t2 ... default expecting FOUND
......@@ -49,6 +52,7 @@ FOUND 12 /tempsecret/ in t2.ibd
FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND
NOT FOUND /foobarsecret/ in ibdata1
UNLOCK TABLES;
# Now turn on encryption and wait for threads to encrypt all spaces
SET GLOBAL innodb_encrypt_tables = on;
# Wait max 10 min for key encryption threads to encrypt all spaces
......@@ -63,6 +67,7 @@ mysql/innodb_table_stats
mysql/transaction_registry
test/t1
test/t2
FLUSH TABLES t1,t2,t3 FOR EXPORT;
# t1 yes on expecting NOT FOUND
NOT FOUND /foobarsecret/ in t1.ibd
# t2 ... on expecting NOT FOUND
......@@ -71,4 +76,5 @@ NOT FOUND /tempsecret/ in t2.ibd
FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND
NOT FOUND /foobarsecret/ in ibdata1
UNLOCK TABLES;
drop table t1, t2, t3;
-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
# embedded does not support restart
-- source include/not_embedded.inc
#
# MDEV-8138: strange results from encrypt-and-grep test
#
......@@ -35,7 +32,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--source include/shutdown_mysqld.inc
FLUSH TABLES t1,t2,t3 FOR EXPORT;
--let SEARCH_PATTERN=foobarsecret
--echo # t1 yes on expecting NOT FOUND
......@@ -54,7 +51,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
-- let SEARCH_FILE=$ib1_IBD
-- source include/search_pattern_in_file.inc
-- source include/start_mysqld.inc
UNLOCK TABLES;
--echo # Now turn off encryption and wait for threads to decrypt everything
......@@ -71,7 +68,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--source include/shutdown_mysqld.inc
FLUSH TABLES t1,t2,t3 FOR EXPORT;
--let SEARCH_PATTERN=foobarsecret
--echo # t1 yes on expecting NOT FOUND
......@@ -90,8 +87,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
-- let SEARCH_FILE=$ib1_IBD
-- source include/search_pattern_in_file.inc
-- source include/start_mysqld.inc
UNLOCK TABLES;
--echo # Now turn on encryption and wait for threads to encrypt all spaces
SET GLOBAL innodb_encrypt_tables = on;
......@@ -106,7 +102,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--source include/shutdown_mysqld.inc
FLUSH TABLES t1,t2,t3 FOR EXPORT;
--let SEARCH_PATTERN=foobarsecret
--echo # t1 yes on expecting NOT FOUND
......@@ -125,6 +121,6 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
-- let SEARCH_FILE=$ib1_IBD
-- source include/search_pattern_in_file.inc
-- source include/start_mysqld.inc
UNLOCK TABLES;
drop table t1, t2, t3;
SET STORAGE_ENGINE=InnoDB;
#
# Start of 10.2 tests
#
#
# MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV in row_merge_fts_doc_tokenize, stack smashing Export
#
CREATE TABLE t1(c TEXT CHARACTER SET tis620);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` text CHARACTER SET tis620 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES('100');
ALTER TABLE t1 ADD FULLTEXT INDEX(c), ALGORITHM=INPLACE;
DROP TABLE t1;
CREATE TABLE t1(c TEXT CHARACTER SET tis620 COLLATE tis620_thai_nopad_ci);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` text CHARACTER SET tis620 COLLATE tis620_thai_nopad_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES('100');
ALTER TABLE t1 ADD FULLTEXT INDEX(c), ALGORITHM=INPLACE;
DROP TABLE t1;
#
# End of 10.2 tests
#
--source include/have_innodb.inc
--source include/have_tis620.inc
SET STORAGE_ENGINE=InnoDB;
--echo #
--echo # Start of 10.2 tests
--echo #
--echo #
--echo # MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV in row_merge_fts_doc_tokenize, stack smashing Export
--echo #
CREATE TABLE t1(c TEXT CHARACTER SET tis620);
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES('100');
ALTER TABLE t1 ADD FULLTEXT INDEX(c), ALGORITHM=INPLACE;
DROP TABLE t1;
CREATE TABLE t1(c TEXT CHARACTER SET tis620 COLLATE tis620_thai_nopad_ci);
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES('100');
ALTER TABLE t1 ADD FULLTEXT INDEX(c), ALGORITHM=INPLACE;
DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
......@@ -2871,3 +2871,14 @@ insert into t1 values (8,'0');
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
unlock tables;
drop table t1;
#
# MDEV-22284 Aria table key read crash because wrong index used
#
create table t1 (
a int auto_increment,
b int, c int,
key(c, a), unique(b)
) engine aria
partition by hash (b);
replace into t1 values (1, 0, 0), (2, 0, 0), (0, 0, 0);
drop table t1;
......@@ -2092,3 +2092,16 @@ aria_page_checksum=$default_checksum,
aria_log_file_size=$default_log_file_size;
--enable_result_log
--enable_query_log
--echo #
--echo # MDEV-22284 Aria table key read crash because wrong index used
--echo #
create table t1 (
a int auto_increment,
b int, c int,
key(c, a), unique(b)
) engine aria
partition by hash (b);
replace into t1 values (1, 0, 0), (2, 0, 0), (0, 0, 0);
# cleanup
drop table t1;
......@@ -8,6 +8,7 @@
# Finish the following tests by calling its common test script:
# include/rpl_get_master_version_and_clock.test.
source include/not_valgrind.inc;
source include/have_debug.inc;
source include/have_debug_sync.inc;
source include/master-slave.inc;
......
......@@ -7,6 +7,7 @@
# Verify row-based events applying when table map id value is about and greater
# than 1 << 32.
##################################################################
--source include/not_valgrind.inc
--source include/word_size.inc
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
......
......@@ -6842,6 +6842,19 @@ class Item_iterator_row: public Item_iterator
};
/*
fix_escape_item() sets the out "escape" parameter to:
- native code in case of an 8bit character set
- Unicode code point in case of a multi-byte character set
The value meaning a not-initialized ESCAPE character must not be equal to
any valid value, so must be outside of these ranges:
- -128..+127, not to conflict with a valid 8bit charcter
- 0..0x10FFFF, not to conflict with a valid Unicode code point
The exact value does not matter.
*/
#define ESCAPE_NOT_INITIALIZED -1000
/*
It's used in ::fix_fields() methods of LIKE and JSON_SEARCH
functions to handle the ESCAPE parameter.
......
......@@ -5251,7 +5251,7 @@ void Item_func_like::print(String *str, enum_query_type query_type)
longlong Item_func_like::val_int()
{
DBUG_ASSERT(fixed == 1);
DBUG_ASSERT(escape != -1);
DBUG_ASSERT(escape != ESCAPE_NOT_INITIALIZED);
String* res= args[0]->val_str(&cmp_value1);
if (args[0]->null_value)
{
......@@ -5355,7 +5355,7 @@ bool fix_escape_item(THD *thd, Item *escape_item, String *tmp_str,
return TRUE;
}
IF_DBUG(*escape= -1,);
IF_DBUG(*escape= ESCAPE_NOT_INITIALIZED,);
if (escape_item->const_item())
{
......
......@@ -9884,7 +9884,6 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
{
/* Allow break with SIGINT, no core or stack trace */
test_flags|= TEST_SIGINT;
opt_stack_trace= 1;
test_flags&= ~TEST_CORE_ON_SIGNAL;
}
/* Set global MyISAM variables from delay_key_write_options */
......
......@@ -79,7 +79,7 @@ que_node_t */
#include "que0que.h"
#include "row0sel.h"
#ifdef __GNUC__
#if defined __GNUC__ && (!defined __clang_major__ || __clang_major__ > 11)
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
#endif
......
......@@ -38,7 +38,7 @@ que_node_t */
#include "que0que.h"
#include "row0sel.h"
#ifdef __GNUC__
#if defined __GNUC__ && (!defined __clang_major__ || __clang_major__ > 11)
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
#endif
......
......@@ -210,7 +210,13 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
info->last_key.data + share->base.max_key_length*2,
info->save_lastkey_data_length + info->save_lastkey_ref_length);
info->update= info->save_update | HA_STATE_WRITTEN;
info->lastinx= info->save_lastinx;
if (info->lastinx != info->save_lastinx) /* Index changed */
{
info->lastinx = info->save_lastinx;
info->last_key.keyinfo= info->s->keyinfo + info->lastinx;
info->last_key.flag= 0;
info->page_changed=1;
}
info->cur_row.lastpos= info->save_lastpos;
info->last_key.data_length= info->save_lastkey_data_length;
info->last_key.ref_length= info->save_lastkey_ref_length;
......
......@@ -401,10 +401,10 @@ my_copy_fix_mb(CHARSET_INFO *cs,
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
set_if_smaller(src_length, dst_length);
well_formed_nchars= cs->cset->well_formed_char_length(cs,
src, src + src_length,
src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
......
......@@ -605,8 +605,8 @@ my_strnxfrm_tis620(CHARSET_INFO *cs,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= (uint) (strmake((char*) dst, (char*) src, MY_MIN(dstlen, srclen)) -
(char*) dst);
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
......@@ -628,8 +628,8 @@ my_strnxfrm_tis620_nopad(CHARSET_INFO *cs,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= (uint) (strmake((char*) dst, (char*) src, MY_MIN(dstlen, srclen)) -
(char*) dst);
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
......
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