mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Lots of code fixes to the replication code (especially the binary logging and index log file handling)
Fixed bugs in my last changeset that made MySQL hard to compile. Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables. Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions Extended my_chsize() to allow one to specify a filler character. Extend vio_blocking to return the old state (This made some usage of this function much simpler) Added testing for some functions that they caller have got the required mutexes before calling the function. Use setrlimit() to ensure that we can write core file if one specifies --core-file. Added --slave-compressed-protocol Made 2 the minimum length for ft_min_word_len Added variables foreign_key_checks & unique_checks. Less logging from replication code (if not started with --log-warnings) Changed that SHOW INNODB STATUS requre the SUPER privilege More DBUG statements and a lot of new code comments
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
#include "ha_innobase.h"
|
||||
#include "ha_innodb.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
@ -1428,13 +1428,16 @@ mysql_execute_command(void)
|
||||
case SQLCOM_LOAD_MASTER_DATA: // sync with master
|
||||
if (check_global_access(thd, SUPER_ACL))
|
||||
goto error;
|
||||
res = load_master_data(thd);
|
||||
if (end_active_trans(thd))
|
||||
res= -1;
|
||||
else
|
||||
res = load_master_data(thd);
|
||||
break;
|
||||
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
case SQLCOM_SHOW_INNODB_STATUS:
|
||||
{
|
||||
if (check_process_priv(thd))
|
||||
if (check_global_access(thd, SUPER_ACL))
|
||||
goto error;
|
||||
res = innodb_show_status(thd);
|
||||
break;
|
||||
@ -2319,7 +2322,7 @@ mysql_execute_command(void)
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -2339,7 +2342,7 @@ mysql_execute_command(void)
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if (mqh_used && lex->sql_command == SQLCOM_GRANT)
|
||||
@ -3325,8 +3328,6 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
|
||||
bool result=0;
|
||||
|
||||
select_errors=0; /* Write if more errors */
|
||||
// TODO: figure out what's up with the commented out line below
|
||||
// mysql_log.flush(); // Flush log
|
||||
if (options & REFRESH_GRANT)
|
||||
{
|
||||
acl_reload();
|
||||
@ -3382,7 +3383,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
|
||||
if (options & REFRESH_SLAVE)
|
||||
{
|
||||
LOCK_ACTIVE_MI;
|
||||
if (reset_slave(active_mi))
|
||||
if (reset_slave(thd, active_mi))
|
||||
result=1;
|
||||
UNLOCK_ACTIVE_MI;
|
||||
}
|
||||
|
Reference in New Issue
Block a user