Commit 7e54c6cf authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

New upstream version 10.1.39

parent e07d9be7
......@@ -86,3 +86,11 @@ int main (int argc __attribute__((unused)),
return 0;
#endif /* DBUG_OFF */
}
#ifdef __SANITIZE_ADDRESS__
/* Disable LeakSanitizer in this executable */
const char* __asan_default_options()
{
return "detect_leaks=0";
}
#endif
......@@ -501,7 +501,8 @@ datafile_open(const char *file, datafile_cur_t *cursor, uint thread_n)
5.6+. We want to make "local" copies for the backup. */
strncpy(cursor->rel_path,
xb_get_relative_path(cursor->abs_path, FALSE),
sizeof(cursor->rel_path));
(sizeof cursor->rel_path) - 1);
cursor->rel_path[(sizeof cursor->rel_path) - 1] = '\0';
cursor->file = os_file_create_simple_no_error_handling(0,
cursor->abs_path,
......@@ -642,8 +643,7 @@ mkdirp(const char *pathname, int Flags, myf MyFlags)
/* make a parent directory path */
if (!(parent= (char *)malloc(len)))
return(-1);
strncpy(parent, pathname, len);
parent[len-1]= 0;
memcpy(parent, pathname, len);
for (p = parent + strlen(parent);
!is_path_separator(*p) && p != parent; p--);
......@@ -1216,6 +1216,7 @@ copy_or_move_file(const char *src_file_path,
if (!directory_exists(dst_dir, true)) {
ret = false;
free(link_filepath);
goto cleanup;
}
......
......@@ -54,7 +54,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "mysqld.h"
#include "encryption_plugin.h"
#include <sstream>
#include "page0zip.h"
char *tool_name;
char tool_args[2048];
......@@ -66,7 +66,6 @@ unsigned long mysql_server_version = 0;
/* server capabilities */
bool have_changed_page_bitmaps = false;
bool have_backup_locks = false;
bool have_backup_safe_binlog_info = false;
bool have_lock_wait_timeout = false;
bool have_galera_enabled = false;
bool have_flush_engine_logs = false;
......@@ -334,7 +333,6 @@ get_mysql_vars(MYSQL *connection)
char *version_comment_var = NULL;
char *innodb_version_var = NULL;
char *have_backup_locks_var = NULL;
char *have_backup_safe_binlog_info_var = NULL;
char *log_bin_var = NULL;
char *lock_wait_timeout_var= NULL;
char *wsrep_on_var = NULL;
......@@ -350,6 +348,7 @@ get_mysql_vars(MYSQL *connection)
char *innodb_undo_directory_var = NULL;
char *innodb_page_size_var = NULL;
char *innodb_undo_tablespaces_var = NULL;
char *page_zip_level_var = NULL;
char *endptr;
unsigned long server_version = mysql_get_server_version(connection);
......@@ -357,8 +356,6 @@ get_mysql_vars(MYSQL *connection)
mysql_variable mysql_vars[] = {
{"have_backup_locks", &have_backup_locks_var},
{"have_backup_safe_binlog_info",
&have_backup_safe_binlog_info_var},
{"log_bin", &log_bin_var},
{"lock_wait_timeout", &lock_wait_timeout_var},
{"gtid_mode", &gtid_mode_var},
......@@ -379,6 +376,7 @@ get_mysql_vars(MYSQL *connection)
{"innodb_undo_directory", &innodb_undo_directory_var},
{"innodb_page_size", &innodb_page_size_var},
{"innodb_undo_tablespaces", &innodb_undo_tablespaces_var},
{"innodb_compression_level", &page_zip_level_var},
{NULL, NULL}
};
......@@ -390,22 +388,12 @@ get_mysql_vars(MYSQL *connection)
}
if (opt_binlog_info == BINLOG_INFO_AUTO) {
if (have_backup_safe_binlog_info_var != NULL)
opt_binlog_info = BINLOG_INFO_LOCKLESS;
else if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
opt_binlog_info = BINLOG_INFO_ON;
else
opt_binlog_info = BINLOG_INFO_OFF;
}
if (have_backup_safe_binlog_info_var == NULL &&
opt_binlog_info == BINLOG_INFO_LOCKLESS) {
msg("Error: --binlog-info=LOCKLESS is not supported by the "
"server\n");
return(false);
}
if (lock_wait_timeout_var != NULL) {
have_lock_wait_timeout = true;
......@@ -512,7 +500,13 @@ get_mysql_vars(MYSQL *connection)
}
if (innodb_undo_tablespaces_var) {
srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var, &endptr, 10);
srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var,
&endptr, 10);
ut_ad(*endptr == 0);
}
if (page_zip_level_var != NULL) {
page_zip_level = strtoul(page_zip_level_var, &endptr, 10);
ut_ad(*endptr == 0);
}
......@@ -1574,6 +1568,7 @@ bool write_backup_config_file()
"innodb_log_block_size=%lu\n"
"innodb_undo_directory=%s\n"
"innodb_undo_tablespaces=%lu\n"
"innodb_compression_level=%u\n"
"%s%s\n"
"%s%s\n"
"%s\n",
......@@ -1586,6 +1581,7 @@ bool write_backup_config_file()
srv_log_block_size,
srv_undo_dir,
srv_undo_tablespaces,
page_zip_level,
innobase_doublewrite_file ? "innodb_doublewrite_file=" : "",
innobase_doublewrite_file ? innobase_doublewrite_file : "",
innobase_buffer_pool_filename ?
......
......@@ -381,6 +381,7 @@ log_online_setup_bitmap_file_range(
msg("InnoDB: Error: inconsistent bitmap file "
"directory\n");
os_file_closedir(bitmap_dir);
free(bitmap_files->files);
return FALSE;
}
......
......@@ -384,6 +384,7 @@ create_worker_threads(uint n)
return threads;
err:
my_free(threads);
return NULL;
}
......
......@@ -67,7 +67,8 @@ void encryption_plugin_backup_init(MYSQL *mysql)
/* Required to load the plugin later.*/
add_to_plugin_load_list(plugin_load.c_str());
strncpy(opt_plugin_dir, dir, FN_REFLEN);
strncpy(opt_plugin_dir, dir, FN_REFLEN - 1);
opt_plugin_dir[FN_REFLEN - 1] = '\0';
oss << "plugin_dir=" << '"' << dir << '"' << endl;
......@@ -133,7 +134,10 @@ void encryption_plugin_prepare_init(int argc, char **argv)
add_to_plugin_load_list(xb_plugin_load);
if (xb_plugin_dir)
strncpy(opt_plugin_dir, xb_plugin_dir, FN_REFLEN);
{
strncpy(opt_plugin_dir, xb_plugin_dir, FN_REFLEN - 1);
opt_plugin_dir[FN_REFLEN - 1] = '\0';
}
char **new_argv = new char *[argc + 1];
new_argv[0] = XTRABACKUP_EXE;
......
......@@ -152,7 +152,8 @@ xb_fil_cur_open(
cursor->space_id = node->space->id;
cursor->is_system = !fil_is_user_tablespace_id(node->space->id);
strncpy(cursor->abs_path, node->name, sizeof(cursor->abs_path));
strncpy(cursor->abs_path, node->name, (sizeof cursor->abs_path) - 1);
cursor->abs_path[(sizeof cursor->abs_path) - 1] = '\0';
/* Get the relative path for the destination tablespace name, i.e. the
one that can be appended to the backup root directory. Non-system
......@@ -160,7 +161,8 @@ xb_fil_cur_open(
5.6+. We want to make "local" copies for the backup. */
strncpy(cursor->rel_path,
xb_get_relative_path(cursor->abs_path, cursor->is_system),
sizeof(cursor->rel_path));
(sizeof cursor->rel_path) - 1);
cursor->rel_path[(sizeof cursor->rel_path) - 1] = '\0';
/* In the backup mode we should already have a tablespace handle created
by fil_load_single_table_tablespace() unless it is a system
......
......@@ -366,9 +366,6 @@ uint opt_safe_slave_backup_timeout = 0;
const char *opt_history = NULL;
/* Whether xtrabackup_binlog_info should be created on recovery */
static bool recover_binlog_info;
/* Simple datasink creation tracking...add datasinks in the reverse order you
want them destroyed. */
#define XTRABACKUP_MAX_DATASINKS 10
......@@ -597,7 +594,8 @@ enum options_xtrabackup
OPT_XTRA_TABLES_EXCLUDE,
OPT_XTRA_DATABASES_EXCLUDE,
OPT_PROTOCOL
OPT_PROTOCOL,
OPT_INNODB_COMPRESSION_LEVEL
};
struct my_option xb_client_options[] =
......@@ -1145,6 +1143,11 @@ Disable with --skip-innodb-doublewrite.", (G_PTR*) &innobase_use_doublewrite,
(G_PTR*)&srv_undo_tablespaces, (G_PTR*)&srv_undo_tablespaces,
0, GET_ULONG, REQUIRED_ARG, 0, 0, 126, 0, 1, 0},
{"innodb_compression_level", OPT_INNODB_COMPRESSION_LEVEL,
"Compression level used for zlib compression.",
(G_PTR*)&page_zip_level, (G_PTR*)&page_zip_level,
0, GET_UINT, REQUIRED_ARG, 6, 0, 9, 0, 0, 0},
{"defaults_group", OPT_DEFAULTS_GROUP, "defaults group in config file (default \"mysqld\").",
(G_PTR*) &defaults_group, (G_PTR*) &defaults_group,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
......@@ -1381,6 +1384,10 @@ xb_get_one_option(int optid,
ADD_PRINT_PARAM_OPT(innodb_checksum_algorithm_names[srv_log_checksum_algorithm]);
break;
case OPT_INNODB_COMPRESSION_LEVEL:
ADD_PRINT_PARAM_OPT(page_zip_level);
break;
case OPT_INNODB_BUFFER_POOL_FILENAME:
ADD_PRINT_PARAM_OPT(innobase_buffer_pool_filename);
......@@ -1854,7 +1861,6 @@ xtrabackup_read_metadata(char *filename)
{
FILE *fp;
my_bool r = TRUE;
int t;
fp = fopen(filename,"r");
if(!fp) {
......@@ -1885,9 +1891,6 @@ xtrabackup_read_metadata(char *filename)
}
/* Optional fields */
if (fscanf(fp, "recover_binlog_info = %d\n", &t) == 1) {
recover_binlog_info = (t == 1);
}
end:
fclose(fp);
......@@ -1906,13 +1909,11 @@ xtrabackup_print_metadata(char *buf, size_t buf_len)
"backup_type = %s\n"
"from_lsn = " UINT64PF "\n"
"to_lsn = " UINT64PF "\n"
"last_lsn = " UINT64PF "\n"
"recover_binlog_info = %d\n",
"last_lsn = " UINT64PF "\n",
metadata_type,
metadata_from_lsn,
metadata_to_lsn,
metadata_last_lsn,
MY_TEST(opt_binlog_info == BINLOG_INFO_LOCKLESS));
metadata_last_lsn);
}
/***********************************************************************
......@@ -2251,8 +2252,9 @@ check_if_skip_table(
return(FALSE);
}
strncpy(buf, dbname, FN_REFLEN);
buf[tbname - 1 - dbname] = 0;
strncpy(buf, dbname, FN_REFLEN - 1);
buf[FN_REFLEN - 1] = '\0';
buf[tbname - 1 - dbname] = '\0';
const skip_database_check_result skip_database =
check_if_skip_database(buf);
......@@ -2260,7 +2262,6 @@ check_if_skip_table(
return (TRUE);
}
buf[FN_REFLEN - 1] = '\0';
buf[tbname - 1 - dbname] = '.';
/* Check if there's a suffix in the table name. If so, truncate it. We
......@@ -4990,7 +4991,8 @@ xtrabackup_apply_delta(
}
dst_path[strlen(dst_path) - 6] = '\0';
strncpy(space_name, filename, FN_REFLEN);
strncpy(space_name, filename, FN_REFLEN - 1);
space_name[FN_REFLEN - 1] = '\0';
space_name[strlen(space_name) - 6] = 0;
if (!get_meta_path(src_path, meta_path)) {
......@@ -5325,6 +5327,7 @@ xb_process_datadir(
fileinfo.name, data))
{
os_file_closedir(dbdir);
os_file_closedir(dir);
return(FALSE);
}
}
......@@ -5789,35 +5792,6 @@ innodb_free_param()
free_tmpdir(&mysql_tmpdir_list);
}
/**************************************************************************
Store the current binary log coordinates in a specified file.
@return 'false' on error. */
static bool
store_binlog_info(
/*==============*/
const char *filename) /*!< in: output file name */
{
FILE *fp;
if (trx_sys_mysql_bin_log_name[0] == '\0') {
return(true);
}
fp = fopen(filename, "w");
if (!fp) {
msg("mariabackup: failed to open '%s'\n", filename);
return(false);
}
fprintf(fp, "%s\t" UINT64PF "\n",
trx_sys_mysql_bin_log_name, trx_sys_mysql_bin_log_pos);
fclose(fp);
return(true);
}
static void
xtrabackup_prepare_func(int argc, char ** argv)
{
......@@ -6036,7 +6010,8 @@ xtrabackup_prepare_func(int argc, char ** argv)
p = next + 1;
}
info_file_path[len - 4] = 0;
strncpy(table_name, prev, FN_REFLEN);
strncpy(table_name, prev, FN_REFLEN - 1);
table_name[FN_REFLEN - 1] = '\0';
info_file_path[len - 4] = '.';
......@@ -6072,8 +6047,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
mach_write_to_4(page , 0x78706f72UL);
mach_write_to_4(page + 4, 0x74696e66UL);/*"xportinf"*/
mach_write_to_4(page + 8, n_index);
strncpy((char *) page + 12,
table_name, 500);
strncpy((char *) page + 12, table_name, FN_REFLEN);
msg("mariabackup: export metadata of "
"table '%s' to file `%s` "
......@@ -6137,17 +6111,6 @@ xtrabackup_prepare_func(int argc, char ** argv)
trx_sys_print_mysql_binlog_offset();
msg("\n");
/* output to xtrabackup_binlog_pos_innodb and (if
backup_safe_binlog_info was available on the server) to
xtrabackup_binlog_info. In the latter case xtrabackup_binlog_pos_innodb
becomes redundant and is created only for compatibility. */
if (!store_binlog_info("xtrabackup_binlog_pos_innodb") ||
(recover_binlog_info &&
!store_binlog_info(XTRABACKUP_BINLOG_INFO))) {
exit(EXIT_FAILURE);
}
/* Check whether the log is applied enough or not. */
if ((xtrabackup_incremental
&& srv_start_lsn < incremental_to_lsn)
......
......@@ -161,7 +161,7 @@ extern uint opt_safe_slave_backup_timeout;
extern const char *opt_history;
enum binlog_info_enum { BINLOG_INFO_OFF, BINLOG_INFO_LOCKLESS, BINLOG_INFO_ON,
enum binlog_info_enum { BINLOG_INFO_OFF, BINLOG_INFO_ON,
BINLOG_INFO_AUTO};
extern ulong opt_binlog_info;
......
......@@ -734,7 +734,11 @@ extern void my_mutex_end(void);
We need to have at least 256K stack to handle calls to myisamchk_init()
with the current number of keys and key parts.
*/
#define DEFAULT_THREAD_STACK (289*1024L)
#ifdef __SANITIZE_ADDRESS__
#define DEFAULT_THREAD_STACK (364*1024L)
#else
#define DEFAULT_THREAD_STACK (292*1024L)
#endif
#endif
#define MY_PTHREAD_LOCK_READ 0
......
......@@ -59,7 +59,7 @@ typedef struct st_tree_element {
#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
typedef struct st_tree {
TREE_ELEMENT *root,null_element;
TREE_ELEMENT *root;
TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
uint offset_to_key,elements_in_tree,size_of_element;
size_t memory_limit, allocated;
......
......@@ -32,17 +32,18 @@
*/
#undef MYSQL_PLUGIN_EXPORT
#if defined(_MSC_VER)
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
#else
#define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
#endif
#define MYSQL_PLUGIN_EXPORT_C __declspec(dllexport)
#else /*_MSC_VER */
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C"
#else
#define MYSQL_PLUGIN_EXPORT
#endif
#define MYSQL_PLUGIN_EXPORT_C
#endif
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C" MYSQL_PLUGIN_EXPORT_C
#define C_MODE_START extern "C" {
#define C_MODE_END }
#else
#define MYSQL_PLUGIN_EXPORT MYSQL_PLUGIN_EXPORT_C
#define C_MODE_START
#define C_MODE_END
#endif
#ifndef MYSQL_ABI_CHECK
......@@ -60,11 +61,12 @@
#define MYSQL_CLIENT_MAX_PLUGINS 3
#define mysql_declare_client_plugin(X) \
MYSQL_PLUGIN_EXPORT struct st_mysql_client_plugin_ ## X \
C_MODE_START MYSQL_PLUGIN_EXPORT_C \
struct st_mysql_client_plugin_ ## X \
_mysql_client_plugin_declaration_ = { \
MYSQL_CLIENT_ ## X ## _PLUGIN, \
MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin }
#define mysql_end_client_plugin }; C_MODE_END
/* generic plugin header structure */
#define MYSQL_CLIENT_PLUGIN_HEADER \
......
......@@ -107,6 +107,7 @@ extern struct wsrep_service_st {
bool (*wsrep_thd_ignore_table_func)(THD *thd);
long long (*wsrep_thd_trx_seqno_func)(THD *thd);
struct wsrep_ws_handle * (*wsrep_thd_ws_handle_func)(THD *thd);
void (*wsrep_thd_auto_increment_variables_func)(THD *thd, unsigned long long *offset, unsigned long long *increment);
int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
void (*wsrep_unlock_rollback_func)();
......@@ -149,6 +150,7 @@ extern struct wsrep_service_st {
#define wsrep_thd_ignore_table(T) wsrep_service->wsrep_thd_ignore_table_func(T)
#define wsrep_thd_trx_seqno(T) wsrep_service->wsrep_thd_trx_seqno_func(T)
#define wsrep_thd_ws_handle(T) wsrep_service->wsrep_thd_ws_handle_func(T)
#define wsrep_thd_auto_increment_variables(T,O,I) wsrep_service->wsrep_thd_auto_increment_variables_func(T,O,I)
#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
......@@ -201,6 +203,7 @@ my_bool wsrep_thd_is_BF(MYSQL_THD thd, my_bool sync);
my_bool wsrep_thd_is_wsrep(MYSQL_THD thd);
struct wsrep *get_wsrep();
struct wsrep_ws_handle *wsrep_thd_ws_handle(THD *thd);
void wsrep_thd_auto_increment_variables(THD *thd, unsigned long long *offset, unsigned long long *increment);
void wsrep_aborting_thd_enqueue(THD *thd);
void wsrep_lock_rollback();
void wsrep_post_commit(THD* thd, bool all);
......
......@@ -50,9 +50,9 @@
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
#define WSREP_SYNC_WAIT(thd_, before_) \
{ if (WSREP_CLIENT(thd_) && \
wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
#define WSREP_SYNC_WAIT(thd_, before_) \
do { if (WSREP_CLIENT(thd_) && \
wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; } while(0)
#define WSREP_ERROR_LABEL wsrep_error_label
#else
#define IF_WSREP(A,B) B
......@@ -64,7 +64,7 @@
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
#define WSREP_TO_ISOLATION_END
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
#define WSREP_SYNC_WAIT(thd_, before_)
#define WSREP_SYNC_WAIT(thd_, before_) do { } while(0)
#define WSREP_ERROR_LABEL goto wsrep_error_label; wsrep_error_label
#endif /* WITH_WSREP */
......
'\" t
.\"
.TH "\FBMYSQL_INSTALL_DB\" "1" "14/12/2015" "MariaDB 10\&.1" "MariaDB Database System"
.TH "\FBMYSQL_INSTALL_DB\FR" "1" "4 April 2019" "MariaDB 10\&.1" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -198,6 +198,21 @@ Must be given as first option\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_install_db: defaults-group-suffix option
.\" defaults-group-suffix option: mysql_install_db
\fB\-\-defaults\-group\-suffix=\fR\fB\fIname\fR\fR
.sp
In addition to the given groups, also read groups with this suffix\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_install_db: force option
.\" force option: mysql_install_db
\fB\-\-force\fR
......@@ -354,7 +369,7 @@ For internal use\&. This option is used for creating Windows distributions\&.
.SH "COPYRIGHT"
.br
.PP
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2019 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
......
......@@ -210,6 +210,30 @@ should be chosen from the following list:
.IP \(bu 2.3
.\}
t,
aa: Sort by rows affected or average rows affected
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
l,
ae: Sort by rows examined or aggregate rows examined
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
l,
at: Sort by query time or average query time
.RE
.sp
......
......@@ -16,3 +16,9 @@ select c1 as c1u from t1 where c1 like 'ab\_def';
# should return ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
drop table t1;
#
# MDEV-13335 UTF8 escape wildcard LIKE match has different behavior in different collations
#
SELECT @@collation_connection;
SELECT '\%b' LIKE '%\%';
......@@ -3,7 +3,7 @@
my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
system("kill -18 $mysqld_pid");
system("kill -SIGCONT $mysqld_pid");
exit(0);
EOF
......@@ -9,6 +9,6 @@
my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
system("kill -19 $mysqld_pid");
system("kill -SIGSTOP $mysqld_pid");
exit(0);
EOF
......@@ -37,12 +37,14 @@ insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8);
let $1=7;
set @d=8;
begin;
while ($1)
{
eval insert into t0 select key1+@d from t0;
eval set @d=@d*2;
dec $1;
}
commit;
--enable_query_log
alter table t0 add key2 int not null, add index i2(key2);
......@@ -360,6 +362,7 @@ INSERT INTO t1 VALUES ('foo','bar', 'ZZ'),('fuz','baz', 'ZZ');
--disable_query_log
let $1=9;
begin;
while ($1)
{
eval INSERT INTO t1 SELECT * from t1 WHERE cola = 'foo';
......@@ -372,6 +375,7 @@ while ($1)
eval INSERT INTO t1 SELECT * from t1 WHERE cola <> 'foo';
dec $1;
}
commit;
--enable_query_log
......
Supports Markdown
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