1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Changes for --with-server-suffix

Fixed mutex bug in logging (crash on windows when doing SET PASSWORD=)
Changed MERGE  tables to not use FILE


BitKeeper/deleted/.del-m.MRG~3f5632c37af00f18:
  Delete: mysql-test/std_data/m.MRG
BitKeeper/deleted/.del-m.frm~e351dfe0b6824c0c:
  Delete: mysql-test/std_data/m.frm
Docs/manual.texi:
  Added DNS section
configure.in:
  Update to 3.23.32
include/Makefile.am:
  Added my_config.h
include/mysql_com.h:
  Changes for --with-server-suffix
include/mysql_version.h.in:
  cleanup
merge/open.c:
  Don't use FILE
mysql-test/Makefile.am:
  removed not needed data files
mysql-test/r/merge.result:
  generate merge file
mysql-test/t/merge.test:
  generate merge file
sql-bench/Results/ATIS-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/RUN-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/alter-table-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/big-tables-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/connect-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/create-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/insert-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/select-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/wisconsin-mysql-NT_4.0:
  New benchmark results
sql/log.cc:
  Ensure that mutex are initialized before used
sql/log_event.h:
  Changes for --with-server-suffix
sql/mysql_priv.h:
  Changes for --with-server-suffix
sql/mysqlbinlog.cc:
  Changes for --with-server-suffix
sql/mysqld.cc:
  changed strnmov -> strmake
sql/net_pkg.cc:
  Prepare for adding char-set conversion to SHOW commands
This commit is contained in:
unknown
2001-01-21 16:30:16 +02:00
parent 9223381f9c
commit ab7afc8c36
26 changed files with 337 additions and 219 deletions

View File

@ -269,7 +269,7 @@ int MYSQL_LOG::find_first_log(LOG_INFO* linfo, const char* log_name)
for(;;)
{
uint length;
if (!(length=my_b_gets(&io_cache, fname, FN_REFLEN)))
if (!(length=my_b_gets(&io_cache, fname, FN_REFLEN-1)))
{
error = !io_cache.error ? LOG_INFO_EOF : LOG_INFO_IO;
goto err;
@ -608,7 +608,9 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command,
bool MYSQL_LOG::write(Query_log_event* event_info)
{
/* In most cases this is only called if 'is_open()' is true */
bool error=1;
bool error=0;
if (!inited) // Can't use mutex if not init
return 0;
VOID(pthread_mutex_lock(&LOCK_log));
if (is_open())
{
@ -622,7 +624,8 @@ bool MYSQL_LOG::write(Query_log_event* event_info)
VOID(pthread_mutex_unlock(&LOCK_log));
return 0;
}
error=1;
if (thd->last_insert_id_used)
{
Intvar_log_event e((uchar)LAST_INSERT_ID_EVENT, thd->last_insert_id);
@ -665,8 +668,6 @@ err:
if (file == &log_file)
VOID(pthread_cond_broadcast(&COND_binlog_update));
}
else
error=0;
VOID(pthread_mutex_unlock(&LOCK_log));
return error;
}
@ -729,23 +730,26 @@ err:
bool MYSQL_LOG::write(Load_log_event* event_info)
{
bool error=0;
VOID(pthread_mutex_lock(&LOCK_log));
if (is_open())
if (inited)
{
THD *thd=event_info->thd;
if ((thd->options & OPTION_BIN_LOG) ||
!(thd->master_access & PROCESS_ACL))
VOID(pthread_mutex_lock(&LOCK_log));
if (is_open())
{
if (event_info->write(&log_file) || flush_io_cache(&log_file))
THD *thd=event_info->thd;
if ((thd->options & OPTION_BIN_LOG) ||
!(thd->master_access & PROCESS_ACL))
{
if (!write_error)
sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
error=write_error=1;
if (event_info->write(&log_file) || flush_io_cache(&log_file))
{
if (!write_error)
sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
error=write_error=1;
}
VOID(pthread_cond_broadcast(&COND_binlog_update));
}
VOID(pthread_cond_broadcast(&COND_binlog_update));
}
VOID(pthread_mutex_unlock(&LOCK_log));
}
VOID(pthread_mutex_unlock(&LOCK_log));
return error;
}