after merge fixes

parent 154961b2
...@@ -8,7 +8,7 @@ show create table t1; ...@@ -8,7 +8,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) */
drop table t1; drop table t1;
create table t1 (a int) create table t1 (a int)
engine = innodb engine = innodb
...@@ -21,7 +21,7 @@ show create table t1; ...@@ -21,7 +21,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) */
drop table t1; drop table t1;
partition by list (a) partition by list (a)
partitions 3 partitions 3
......
...@@ -936,7 +936,7 @@ bool LOGGER::activate_log_handler(THD* thd, uint log_type) ...@@ -936,7 +936,7 @@ bool LOGGER::activate_log_handler(THD* thd, uint log_type)
if ((res= reopen_log_table(log_type))) if ((res= reopen_log_table(log_type)))
goto err; goto err;
file_log_handler->get_mysql_slow_log()-> file_log_handler->get_mysql_slow_log()->
open_query_log(sys_var_slow_log_path.value); open_slow_log(sys_var_slow_log_path.value);
init_slow_log(log_output_options); init_slow_log(log_output_options);
opt_slow_log= TRUE; opt_slow_log= TRUE;
} }
......
...@@ -467,8 +467,8 @@ class Log_to_file_event_handler: public Log_event_handler ...@@ -467,8 +467,8 @@ class Log_to_file_event_handler: public Log_event_handler
CHARSET_INFO *client_cs); CHARSET_INFO *client_cs);
void flush(); void flush();
void init_pthread_objects(); void init_pthread_objects();
MYSQL_LOG *get_mysql_slow_log() { return &mysql_slow_log; } MYSQL_QUERY_LOG *get_mysql_slow_log() { return &mysql_slow_log; }
MYSQL_LOG *get_mysql_log() { return &mysql_log; } MYSQL_QUERY_LOG *get_mysql_log() { return &mysql_log; }
}; };
...@@ -543,13 +543,13 @@ class LOGGER ...@@ -543,13 +543,13 @@ class LOGGER
void init_general_log(uint general_log_printer); void init_general_log(uint general_log_printer);
void deactivate_log_handler(THD* thd, uint log_type); void deactivate_log_handler(THD* thd, uint log_type);
bool activate_log_handler(THD* thd, uint log_type); bool activate_log_handler(THD* thd, uint log_type);
MYSQL_LOG *get_slow_log_file_handler() MYSQL_QUERY_LOG *get_slow_log_file_handler()
{ {
if (file_log_handler) if (file_log_handler)
return file_log_handler->get_mysql_slow_log(); return file_log_handler->get_mysql_slow_log();
return NULL; return NULL;
} }
MYSQL_LOG *get_log_file_handler() MYSQL_QUERY_LOG *get_log_file_handler()
{ {
if (file_log_handler) if (file_log_handler)
return file_log_handler->get_mysql_log(); return file_log_handler->get_mysql_log();
......
...@@ -2602,7 +2602,7 @@ bool update_sys_var_str_path(THD *thd, sys_var_str *var_str, ...@@ -2602,7 +2602,7 @@ bool update_sys_var_str_path(THD *thd, sys_var_str *var_str,
set_var *var, const char *log_ext, set_var *var, const char *log_ext,
bool log_state, uint log_type) bool log_state, uint log_type)
{ {
MYSQL_LOG *file_log; MYSQL_QUERY_LOG *file_log;
char buff[FN_REFLEN]; char buff[FN_REFLEN];
char *res= 0, *old_value=(char *)(var ? var->value->str_value.ptr() : 0); char *res= 0, *old_value=(char *)(var ? var->value->str_value.ptr() : 0);
bool result= 0; bool result= 0;
...@@ -2640,7 +2640,18 @@ bool update_sys_var_str_path(THD *thd, sys_var_str *var_str, ...@@ -2640,7 +2640,18 @@ bool update_sys_var_str_path(THD *thd, sys_var_str *var_str,
var_str->value_length= str_length; var_str->value_length= str_length;
my_free(old_value, MYF(MY_ALLOW_ZERO_PTR)); my_free(old_value, MYF(MY_ALLOW_ZERO_PTR));
if (file_log && log_state) if (file_log && log_state)
{
switch (log_type) {
case QUERY_LOG_SLOW:
file_log->open_slow_log(sys_var_general_log_path.value);
break;
case QUERY_LOG_GENERAL:
file_log->open_query_log(sys_var_general_log_path.value); file_log->open_query_log(sys_var_general_log_path.value);
break;
default:
DBUG_ASSERT(0);
}
}
logger.unlock(); logger.unlock();
pthread_mutex_unlock(&LOCK_global_system_variables); pthread_mutex_unlock(&LOCK_global_system_variables);
......
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