Merge 10.0-base -> mwl253
This commit is contained in:
commit
8c71e7a383
4
debian/autobake-deb.sh
vendored
4
debian/autobake-deb.sh
vendored
@ -21,8 +21,8 @@ source ./VERSION
|
||||
UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}"
|
||||
RELEASE_EXTRA=""
|
||||
|
||||
RELEASE_NAME=mariadb
|
||||
PATCHLEVEL=""
|
||||
RELEASE_NAME=""
|
||||
PATCHLEVEL="+maria"
|
||||
LOGSTRING="MariaDB build"
|
||||
|
||||
# Look up distro-version specific stuff.
|
||||
|
@ -169,7 +169,7 @@ enum mysql_option
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
|
||||
MYSQL_PROGRESS_CALLBACK,
|
||||
/* MariaDB options */
|
||||
MYSQL_OPT_NONBLOCK=6000
|
||||
MYSQL_OPT_NONBLOCK=6000, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY
|
||||
};
|
||||
|
||||
/**
|
||||
@ -194,7 +194,7 @@ struct st_mysql_options {
|
||||
unsigned long max_allowed_packet;
|
||||
my_bool use_ssl; /* if to use SSL or not */
|
||||
my_bool compress,named_pipe;
|
||||
my_bool unused1;
|
||||
my_bool use_thread_specific_memory;
|
||||
my_bool unused2;
|
||||
my_bool unused3;
|
||||
my_bool unused4;
|
||||
|
@ -83,7 +83,7 @@ enum enum_mysql_set_option
|
||||
my_bool my_net_init(NET *net, Vio* vio, unsigned int my_flags);
|
||||
void my_net_local_init(NET *net);
|
||||
void net_end(NET *net);
|
||||
void net_clear(NET *net, my_bool clear_buffer);
|
||||
void net_clear(NET *net, my_bool clear_buffer);
|
||||
my_bool net_realloc(NET *net, size_t length);
|
||||
my_bool net_flush(NET *net);
|
||||
my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
|
||||
@ -263,7 +263,7 @@ enum mysql_option
|
||||
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
|
||||
MYSQL_PROGRESS_CALLBACK,
|
||||
MYSQL_OPT_NONBLOCK=6000
|
||||
MYSQL_OPT_NONBLOCK=6000, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY
|
||||
};
|
||||
struct st_mysql_options_extention;
|
||||
struct st_mysql_options {
|
||||
@ -282,7 +282,7 @@ struct st_mysql_options {
|
||||
unsigned long max_allowed_packet;
|
||||
my_bool use_ssl;
|
||||
my_bool compress,named_pipe;
|
||||
my_bool unused1;
|
||||
my_bool use_thread_specific_memory;
|
||||
my_bool unused2;
|
||||
my_bool unused3;
|
||||
my_bool unused4;
|
||||
|
@ -4783,6 +4783,9 @@ sub extract_warning_lines ($$) {
|
||||
qr|Warning: io_setup\(\) failed|,
|
||||
qr|Warning: io_setup\(\) attempt|,
|
||||
qr|setrlimit could not change the size of core files to 'infinity';|,
|
||||
qr|feedback plugin: failed to retrieve the MAC address|,
|
||||
qr|Plugin 'FEEDBACK' init function returned error|,
|
||||
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
|
||||
);
|
||||
|
||||
my $matched_lines= [];
|
||||
|
@ -5,7 +5,10 @@ a VARCHAR(100),
|
||||
INDEX(a)
|
||||
) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
SET debug_sync= 'myisam_after_repair_by_sort SIGNAL waiting WAIT_FOR go';
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
SET debug_sync= 'now WAIT_FOR waiting';
|
||||
SET debug_sync= 'now SIGNAL go';
|
||||
SHOW TABLE STATUS LIKE 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Dynamic 100000 27 # # # 0 NULL # # # latin1_swedish_ci NULL
|
||||
|
@ -36,7 +36,7 @@ let $wait_condition =
|
||||
# depending on platform.
|
||||
#
|
||||
connection con1;
|
||||
-- error 1317, 2006, 2013
|
||||
-- error 1317, 2006, 2013, ER_CONNECTION_KILLED
|
||||
reap;
|
||||
connection default;
|
||||
DROP TABLE bug51920;
|
||||
|
@ -23,6 +23,7 @@ while ($con_name != 'No such row')
|
||||
|
||||
--error 0,ER_FLUSH_MASTER_BINLOG_CLOSED
|
||||
reset master;
|
||||
set global gtid_pos='';
|
||||
eval set default_master_connection = '$default_master';
|
||||
|
||||
--source include/end_include_file.inc
|
||||
|
@ -11,8 +11,8 @@ include/wait_for_slave_to_start.inc
|
||||
set default_master_connection = '';
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Pos
|
||||
slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 mysqld-relay-bin-slave1.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 1 0 0 1073741824 7 0 60.000 0-1-3
|
||||
slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 0 0 1073741824 7 0 60.000 0-1-3
|
||||
slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 mysqld-relay-bin-slave1.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 1 0 0 1073741824 7 0 60.000
|
||||
slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 0 0 1073741824 7 0 60.000
|
||||
start all slaves;
|
||||
stop slave 'slave1';
|
||||
show slave 'slave1' status;
|
||||
@ -60,18 +60,18 @@ Using_Gtid 0
|
||||
reset slave 'slave1';
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Pos
|
||||
slave1 127.0.0.1 root MYPORT_1 60 4 599 No No 0 0 0 904 None 0 No NULL No 0 0 1 0 0 1073741824 7 0 60.000 0-1-3
|
||||
slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 0 0 1073741824 7 0 60.000 0-1-3
|
||||
slave1 127.0.0.1 root MYPORT_1 60 4 599 No No 0 0 0 904 None 0 No NULL No 0 0 1 0 0 1073741824 7 0 60.000
|
||||
slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 0 0 1073741824 7 0 60.000
|
||||
reset slave 'slave1' all;
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Pos
|
||||
slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 0 0 1073741824 7 0 60.000 0-1-3
|
||||
slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 0 0 1073741824 7 0 60.000
|
||||
stop all slaves;
|
||||
Warnings:
|
||||
Note 1938 SLAVE 'slave2' stopped
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Pos
|
||||
slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 No No 0 0 311 904 None 0 No NULL No 0 0 2 0 0 1073741824 7 0 60.000 0-1-3
|
||||
slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 No No 0 0 311 904 None 0 No NULL No 0 0 2 0 0 1073741824 7 0 60.000
|
||||
stop all slaves;
|
||||
include/reset_master_slave.inc
|
||||
include/reset_master_slave.inc
|
||||
|
@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
--source include/big_test.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
@ -29,15 +30,18 @@ while ($1)
|
||||
--enable_query_log
|
||||
|
||||
--connect(con1,localhost,root,,)
|
||||
--send
|
||||
SET debug_sync= 'myisam_after_repair_by_sort SIGNAL waiting WAIT_FOR go';
|
||||
send
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
|
||||
--connection default
|
||||
--let $wait_timeout=10
|
||||
--let $wait_timeout=60
|
||||
--let $show_statement= SHOW PROCESSLIST
|
||||
--let $field= State
|
||||
--let $condition= = 'Repair by sorting'
|
||||
--source include/wait_show_condition.inc
|
||||
SET debug_sync= 'now WAIT_FOR waiting';
|
||||
SET debug_sync= 'now SIGNAL go';
|
||||
|
||||
--replace_column 7 # 8 # 9 # 12 # 13 # 14 #
|
||||
SHOW TABLE STATUS LIKE 't1';
|
||||
|
@ -892,7 +892,9 @@ void free_old_query(MYSQL *mysql)
|
||||
if (mysql->fields)
|
||||
free_root(&mysql->field_alloc,MYF(0));
|
||||
/* Assume rowlength < 8192 */
|
||||
init_alloc_root(&mysql->field_alloc, 8192, 0, MYF(MY_THREAD_SPECIFIC));
|
||||
init_alloc_root(&mysql->field_alloc, 8192, 0,
|
||||
MYF(mysql->options.use_thread_specific_memory ?
|
||||
MY_THREAD_SPECIFIC : 0));
|
||||
mysql->fields= 0;
|
||||
mysql->field_count= 0; /* For API */
|
||||
mysql->warning_count= 0;
|
||||
@ -1578,7 +1580,9 @@ MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
/* Assume rowlength < 8192 */
|
||||
init_alloc_root(&result->alloc, 8192, 0, MYF(MY_THREAD_SPECIFIC));
|
||||
init_alloc_root(&result->alloc, 8192, 0,
|
||||
MYF(mysql->options.use_thread_specific_memory ?
|
||||
MY_THREAD_SPECIFIC : 0));
|
||||
result->alloc.min_malloc=sizeof(MYSQL_ROWS);
|
||||
prev_ptr= &result->data;
|
||||
result->rows=0;
|
||||
@ -4206,6 +4210,9 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
|
||||
case MYSQL_OPT_RECONNECT:
|
||||
mysql->reconnect= *(my_bool *) arg;
|
||||
break;
|
||||
case MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY:
|
||||
mysql->options.use_thread_specific_memory= *(my_bool *) arg;
|
||||
break;
|
||||
case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
|
||||
if (*(my_bool*) arg)
|
||||
mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT;
|
||||
|
@ -163,7 +163,7 @@ const TABLE_FIELD_TYPE event_table_fields[ET_FIELD_COUNT] =
|
||||
};
|
||||
|
||||
static const TABLE_FIELD_DEF
|
||||
event_table_def= {ET_FIELD_COUNT, event_table_fields};
|
||||
event_table_def= {ET_FIELD_COUNT, event_table_fields, 0, (uint*) 0};
|
||||
|
||||
class Event_db_intact : public Table_check_intact
|
||||
{
|
||||
|
@ -225,3 +225,7 @@ void free_rpl_filter(const char *name, Rpl_filter *filter)
|
||||
delete filter;
|
||||
}
|
||||
|
||||
void free_all_rpl_filters()
|
||||
{
|
||||
rpl_filters.delete_elements((void (*)(const char*, uchar*)) free_rpl_filter);
|
||||
}
|
||||
|
@ -53,5 +53,6 @@ Rpl_filter *create_rpl_filter(const char *name, uint length);
|
||||
Rpl_filter *get_rpl_filter(LEX_STRING *filter_name);
|
||||
Rpl_filter *get_or_create_rpl_filter(const char *name, uint length);
|
||||
void free_rpl_filter(const char *name, Rpl_filter *filter);
|
||||
void free_all_rpl_filters(void);
|
||||
|
||||
#endif /* KEYCACHES_INCLUDED */
|
||||
|
@ -48,7 +48,8 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
|
||||
no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id),
|
||||
info_fd(-1), cur_log_fd(-1), relay_log(&sync_relaylog_period),
|
||||
sync_counter(0), is_relay_log_recovery(is_slave_recovery),
|
||||
save_temporary_tables(0), cur_log_old_open_count(0), group_relay_log_pos(0),
|
||||
save_temporary_tables(0), mi(0),
|
||||
cur_log_old_open_count(0), group_relay_log_pos(0),
|
||||
event_relay_log_pos(0),
|
||||
#if HAVE_valgrind
|
||||
is_fake(FALSE),
|
||||
@ -61,7 +62,7 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
|
||||
gtid_sub_id(0), tables_to_lock(0), tables_to_lock_count(0),
|
||||
last_event_start_time(0), deferred_events(NULL),m_flags(0),
|
||||
row_stmt_start_timestamp(0), long_find_row_note_printed(false),
|
||||
m_annotate_event(0), mi(0)
|
||||
m_annotate_event(0)
|
||||
{
|
||||
DBUG_ENTER("Relay_log_info::Relay_log_info");
|
||||
|
||||
|
11
sql/slave.cc
11
sql/slave.cc
@ -870,6 +870,7 @@ void end_slave()
|
||||
master_info_index= 0;
|
||||
active_mi= 0;
|
||||
mysql_mutex_unlock(&LOCK_active_mi);
|
||||
free_all_rpl_filters();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -5003,6 +5004,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
|
||||
int last_errno= -2; // impossible error
|
||||
ulong err_count=0;
|
||||
char llbuff[22];
|
||||
my_bool my_true= 1;
|
||||
DBUG_ENTER("connect_to_master");
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
@ -5014,6 +5016,8 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
|
||||
|
||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout);
|
||||
mysql_options(mysql, MYSQL_OPT_READ_TIMEOUT, (char *) &slave_net_timeout);
|
||||
mysql_options(mysql, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY,
|
||||
(char*) &my_true);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (mi->ssl)
|
||||
@ -5129,14 +5133,15 @@ MYSQL *rpl_connect_master(MYSQL *mysql)
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
Master_info *mi= my_pthread_getspecific_ptr(Master_info*, RPL_MASTER_INFO);
|
||||
bool allocated= false;
|
||||
my_bool my_true= 1;
|
||||
|
||||
if (!mi)
|
||||
{
|
||||
sql_print_error("'rpl_connect_master' must be called in slave I/O thread context.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool allocated= false;
|
||||
|
||||
if (!mysql)
|
||||
{
|
||||
if(!(mysql= mysql_init(NULL)))
|
||||
@ -5156,6 +5161,8 @@ MYSQL *rpl_connect_master(MYSQL *mysql)
|
||||
*/
|
||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout);
|
||||
mysql_options(mysql, MYSQL_OPT_READ_TIMEOUT, (char *) &slave_net_timeout);
|
||||
mysql_options(mysql, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY,
|
||||
(char*) &my_true);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (mi->ssl)
|
||||
|
@ -168,7 +168,7 @@ TABLE_FIELD_TYPE proc_table_fields[MYSQL_PROC_FIELD_COUNT] =
|
||||
};
|
||||
|
||||
static const TABLE_FIELD_DEF
|
||||
proc_table_def= {MYSQL_PROC_FIELD_COUNT, proc_table_fields};
|
||||
proc_table_def= {MYSQL_PROC_FIELD_COUNT, proc_table_fields, 0, (uint*) 0 };
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
|
@ -171,7 +171,7 @@ TABLE_FIELD_TYPE mysql_db_table_fields[MYSQL_DB_FIELD_COUNT] = {
|
||||
};
|
||||
|
||||
const TABLE_FIELD_DEF
|
||||
mysql_db_table_def= {MYSQL_DB_FIELD_COUNT, mysql_db_table_fields};
|
||||
mysql_db_table_def= {MYSQL_DB_FIELD_COUNT, mysql_db_table_fields, 0, (uint*) 0 };
|
||||
|
||||
static LEX_STRING native_password_plugin_name= {
|
||||
C_STRING_WITH_LEN("mysql_native_password")
|
||||
|
@ -423,8 +423,10 @@ int federatedx_io_mysql::actual_query(const char *buffer, uint length)
|
||||
|
||||
if (!mysql.net.vio)
|
||||
{
|
||||
my_bool my_true= 1;
|
||||
|
||||
if (!(mysql_init(&mysql)))
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
/*
|
||||
BUG# 17044 Federated Storage Engine is not UTF8 clean
|
||||
@ -433,6 +435,8 @@ int federatedx_io_mysql::actual_query(const char *buffer, uint length)
|
||||
*/
|
||||
/* this sets the csname like 'set names utf8' */
|
||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, get_charsetname());
|
||||
mysql_options(&mysql, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY,
|
||||
(char*) &my_true);
|
||||
|
||||
if (!mysql_real_connect(&mysql,
|
||||
get_hostname(),
|
||||
|
@ -3593,12 +3593,15 @@ int ha_federatedx::discover_assisted(handlerton *hton, THD* thd,
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW rdata;
|
||||
ulong *rlen;
|
||||
my_bool my_true= 1;
|
||||
|
||||
if (parse_url(thd->mem_root, &tmp_share, table_s, 1))
|
||||
return HA_WRONG_CREATE_OPTION;
|
||||
|
||||
mysql_init(&mysql);
|
||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, cs->csname);
|
||||
mysql_options(&mysql, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY,
|
||||
(char*) &my_true);
|
||||
|
||||
if (!mysql_real_connect(&mysql, tmp_share.hostname, tmp_share.username,
|
||||
tmp_share.password, tmp_share.database,
|
||||
|
@ -1369,7 +1369,6 @@ os_file_set_nocache(
|
||||
#endif
|
||||
static int os_file_set_atomic_writes(os_file_t file, const char *name)
|
||||
{
|
||||
static int first_time = 1;
|
||||
int atomic_option = 1;
|
||||
|
||||
int ret = ioctl (file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic_option);
|
||||
@ -2027,7 +2026,7 @@ os_file_set_size(
|
||||
"InnoDB: Error: preallocating data for"
|
||||
" file %s failed at\n"
|
||||
"InnoDB: offset 0 size %lld %lld. Operating system"
|
||||
" error number %llu.\n"
|
||||
" error number %d.\n"
|
||||
"InnoDB: Check that the disk is not full"
|
||||
" or a disk quota exceeded.\n"
|
||||
"InnoDB: Some operating system error numbers"
|
||||
|
@ -1246,17 +1246,13 @@ static int check_dynamic_record(HA_CHECK *param, MARIA_HA *info, int extend,
|
||||
{
|
||||
MARIA_BLOCK_INFO block_info;
|
||||
MARIA_SHARE *share= info->s;
|
||||
my_off_t start_recpos, start_block, pos;
|
||||
uchar *to;
|
||||
ulong left_length;
|
||||
my_off_t UNINIT_VAR(start_recpos), start_block, pos;
|
||||
uchar *UNINIT_VAR(to);
|
||||
ulong UNINIT_VAR(left_length);
|
||||
uint b_type;
|
||||
char llbuff[22],llbuff2[22],llbuff3[22];
|
||||
DBUG_ENTER("check_dynamic_record");
|
||||
|
||||
LINT_INIT(left_length);
|
||||
LINT_INIT(start_recpos);
|
||||
LINT_INIT(to);
|
||||
|
||||
pos= 0;
|
||||
while (pos < share->state.state.data_file_length)
|
||||
{
|
||||
@ -1847,10 +1843,8 @@ static int check_block_record(HA_CHECK *param, MARIA_HA *info, int extend,
|
||||
pos < share->state.state.data_file_length;
|
||||
pos+= block_size, page++)
|
||||
{
|
||||
uint row_count, real_row_count, empty_space, page_type, bitmap_pattern;
|
||||
uint UNINIT_VAR(row_count), real_row_count, empty_space, page_type, bitmap_pattern;
|
||||
uint bitmap_for_page;
|
||||
LINT_INIT(row_count);
|
||||
LINT_INIT(empty_space);
|
||||
|
||||
if (_ma_killed_ptr(param))
|
||||
{
|
||||
|
@ -758,13 +758,11 @@ static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon)
|
||||
struct st_state_copy *state_copies= NULL, /**< fixed-size cache of states */
|
||||
*state_copies_end, /**< cache ends here */
|
||||
*state_copy; /**< iterator in cache */
|
||||
TRANSLOG_ADDRESS state_copies_horizon; /**< horizon of states' _copies_ */
|
||||
TRANSLOG_ADDRESS UNINIT_VAR(state_copies_horizon); /**< horizon of states' _copies_ */
|
||||
struct st_filter_param filter_param;
|
||||
PAGECACHE_FLUSH_FILTER filter;
|
||||
DBUG_ENTER("collect_tables");
|
||||
|
||||
LINT_INIT(state_copies_horizon);
|
||||
|
||||
/* let's make a list of distinct shares */
|
||||
mysql_mutex_lock(&THR_LOCK_maria);
|
||||
for (nb= 0, pos= maria_open_list; pos; pos= pos->next)
|
||||
|
@ -185,18 +185,14 @@ static int split_maria_rtree_node(SplitStruct *node, int n_entries,
|
||||
double **d_buffer, int n_dim)
|
||||
{
|
||||
SplitStruct *cur;
|
||||
SplitStruct *a;
|
||||
SplitStruct *b;
|
||||
SplitStruct *UNINIT_VAR(a);
|
||||
SplitStruct *UNINIT_VAR(b);
|
||||
double *g1= reserve_coords(d_buffer, n_dim);
|
||||
double *g2= reserve_coords(d_buffer, n_dim);
|
||||
SplitStruct *next;
|
||||
int next_node;
|
||||
SplitStruct *UNINIT_VAR(next);
|
||||
int UNINIT_VAR(next_node);
|
||||
int i;
|
||||
SplitStruct *end= node + n_entries;
|
||||
LINT_INIT(a);
|
||||
LINT_INIT(b);
|
||||
LINT_INIT(next);
|
||||
LINT_INIT(next_node);
|
||||
|
||||
if (all_size < min_size * 2)
|
||||
{
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "rt_index.h"
|
||||
#include "sql_table.h" // tablename_to_filename
|
||||
#include "sql_class.h" // THD
|
||||
#include "debug_sync.h"
|
||||
|
||||
ulonglong myisam_recover_options;
|
||||
static ulong opt_myisam_block_size;
|
||||
@ -1127,6 +1128,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize)
|
||||
thd_proc_info(thd, "Repair by sorting");
|
||||
error = mi_repair_by_sort(¶m, file, fixed_name,
|
||||
test(param.testflag & T_QUICK));
|
||||
DEBUG_SYNC(thd, "myisam_after_repair_by_sort");
|
||||
}
|
||||
if (error && file->create_unique_index_by_sort &&
|
||||
share->state.dupp_key != MAX_KEY)
|
||||
|
@ -113,7 +113,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_current::m_field_def=
|
||||
{ 16, field_types };
|
||||
{ 16, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_current::m_share=
|
||||
|
@ -69,7 +69,7 @@ static const TABLE_FIELD_TYPE ews_by_thread_by_event_name_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_summary_by_thread_by_event_name::m_field_def=
|
||||
{ 7, ews_by_thread_by_event_name_field_types };
|
||||
{ 7, ews_by_thread_by_event_name_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_summary_by_thread_by_event_name::m_share=
|
||||
@ -381,7 +381,7 @@ static const TABLE_FIELD_TYPE ews_by_instance_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_summary_by_instance::m_field_def=
|
||||
{ 7, ews_by_instance_field_types };
|
||||
{ 7, ews_by_instance_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_summary_by_instance::m_share=
|
||||
|
@ -64,7 +64,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_global_by_event_name::m_field_def=
|
||||
{ 6, field_types };
|
||||
{ 6, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_global_by_event_name::m_share=
|
||||
|
@ -49,7 +49,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_instances::m_field_def=
|
||||
{ 3, field_types };
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_instances::m_share=
|
||||
|
@ -59,7 +59,7 @@ static const TABLE_FIELD_TYPE fs_by_event_name_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_event_name::m_field_def=
|
||||
{ 5, fs_by_event_name_field_types };
|
||||
{ 5, fs_by_event_name_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_event_name::m_share=
|
||||
@ -222,7 +222,7 @@ static const TABLE_FIELD_TYPE fs_by_instance_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_instance::m_field_def=
|
||||
{ 6, fs_by_instance_field_types };
|
||||
{ 6, fs_by_instance_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_instance::m_share=
|
||||
|
@ -53,7 +53,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_performance_timers::m_field_def=
|
||||
{ 4, field_types };
|
||||
{ 4, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_performance_timers::m_share=
|
||||
|
@ -79,7 +79,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_consumers::m_field_def=
|
||||
{ 2, field_types };
|
||||
{ 2, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_consumers::m_share=
|
||||
|
@ -49,7 +49,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_instruments::m_field_def=
|
||||
{ 3, field_types };
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_instruments::m_share=
|
||||
|
@ -52,7 +52,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_timers::m_field_def=
|
||||
{ 2, field_types };
|
||||
{ 2, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_timers::m_share=
|
||||
|
@ -50,7 +50,7 @@ static const TABLE_FIELD_TYPE mutex_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_mutex_instances::m_field_def=
|
||||
{ 3, mutex_field_types };
|
||||
{ 3, mutex_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_mutex_instances::m_share=
|
||||
@ -218,7 +218,7 @@ static const TABLE_FIELD_TYPE rwlock_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_rwlock_instances::m_field_def=
|
||||
{ 4, rwlock_field_types };
|
||||
{ 4, rwlock_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_rwlock_instances::m_share=
|
||||
@ -383,7 +383,7 @@ static const TABLE_FIELD_TYPE cond_field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_cond_instances::m_field_def=
|
||||
{ 2, cond_field_types };
|
||||
{ 2, cond_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_cond_instances::m_share=
|
||||
|
@ -47,7 +47,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_threads::m_field_def=
|
||||
{ 3, field_types };
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_threads::m_share=
|
||||
|
@ -2333,7 +2333,11 @@ int ha_sphinx::write_row ( byte * )
|
||||
SPH_RET ( ER_OUT_OF_RESOURCES );
|
||||
|
||||
unsigned int uTimeout = 1;
|
||||
mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout );
|
||||
my_bool my_true= 1;
|
||||
mysql_options(pConn, MYSQL_OPT_CONNECT_TIMEOUT,
|
||||
(const char*) &uTimeout);
|
||||
mysql_options(pConn, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY,
|
||||
(char*) &my_true);
|
||||
|
||||
if ( !mysql_real_connect ( pConn, m_pShare->m_sHost, "root", "", "", m_pShare->m_iPort, m_pShare->m_sSocket, 0 ) )
|
||||
SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) );
|
||||
@ -2392,7 +2396,11 @@ int ha_sphinx::delete_row ( const byte * )
|
||||
SPH_RET ( ER_OUT_OF_RESOURCES );
|
||||
|
||||
unsigned int uTimeout = 1;
|
||||
mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout );
|
||||
my_bool my_true= 1;
|
||||
mysql_options(pConn, MYSQL_OPT_CONNECT_TIMEOUT,
|
||||
(const char*) &uTimeout);
|
||||
mysql_options(pConn, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY,
|
||||
(char*) &my_true);
|
||||
|
||||
if ( !mysql_real_connect ( pConn, m_pShare->m_sHost, "root", "", "", m_pShare->m_iPort, m_pShare->m_sSocket, 0 ) )
|
||||
SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) );
|
||||
|
@ -1462,7 +1462,6 @@ os_file_set_nocache(
|
||||
#endif
|
||||
static int os_file_set_atomic_writes(os_file_t file, const char *name)
|
||||
{
|
||||
static int first_time = 1;
|
||||
int atomic_option = 1;
|
||||
|
||||
int ret = ioctl (file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic_option);
|
||||
@ -2138,7 +2137,7 @@ os_file_set_size(
|
||||
"InnoDB: Error: preallocating data for"
|
||||
" file %s failed at\n"
|
||||
"InnoDB: offset 0 size %lld %lld. Operating system"
|
||||
" error number %llu.\n"
|
||||
" error number %d.\n"
|
||||
"InnoDB: Check that the disk is not full"
|
||||
" or a disk quota exceeded.\n"
|
||||
"InnoDB: Some operating system error numbers"
|
||||
|
Loading…
x
Reference in New Issue
Block a user