summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sasha@laptop.slkc.uswest.net>2000-11-11 14:57:35 -0700
committerunknown <sasha@laptop.slkc.uswest.net>2000-11-11 14:57:35 -0700
commitfd2c900e5229810ffe6051da6e2839a1ab90b376 (patch)
tree32a840c24805d4d0e41b0fe983db15e78c2866e7 /sql
parent19d2e8ce98ed4f77f94f1cde422f3ace73f64315 (diff)
downloadmariadb-git-fd2c900e5229810ffe6051da6e2839a1ab90b376.tar.gz
laptop commit
BUILD/compile-pentium-debug-no-bdb: forgot to install BDB on my laptop, needed to have this sql/log.cc: fixed initialization warning sql/sql_insert.cc: delayed insert was getting logged on failure. To make things worse, all delayed inserts were being logged with query_length=0 sql/sql_repl.cc: fixed compiler warnings
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc1
-rw-r--r--sql/sql_insert.cc2
-rw-r--r--sql/sql_repl.cc9
3 files changed, 10 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 42af3a8397b..bf99bb32f09 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -289,6 +289,7 @@ int MYSQL_LOG::purge_logs(THD* thd, const char* to_log)
bool logs_to_purge_inited = 0, logs_to_keep_inited = 0, found_log = 0;
DYNAMIC_ARRAY logs_to_purge, logs_to_keep;
my_off_t purge_offset ;
+ LINT_INIT(purge_offset);
pthread_mutex_lock(&LOCK_index);
if(my_fseek(index_file, 0, MY_SEEK_SET,
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 9fc47cd4dfc..7195caca176 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1089,12 +1089,14 @@ bool delayed_insert::handle_inserts(void)
pthread_mutex_lock(&LOCK_delayed_status);
delayed_insert_errors++;
pthread_mutex_unlock(&LOCK_delayed_status);
+ row->log_query = 0;
}
if (row->query && row->log_query)
{
mysql_update_log.write(&thd,row->query, row->query_length);
if (mysql_bin_log.is_open())
{
+ thd.query_length = row->query_length;
Query_log_event qinfo(&thd, row->query);
mysql_bin_log.write(&qinfo);
}
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 3dc9514476b..4142c003d4d 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -149,7 +149,7 @@ int purge_master_logs(THD* thd, const char* to_log)
char search_file_name[FN_REFLEN];
mysql_bin_log.make_log_name(search_file_name, to_log);
int res = mysql_bin_log.purge_logs(thd, search_file_name);
- char* errmsg = 0;
+ const char* errmsg = 0;
switch(res)
{
case 0: break;
@@ -169,9 +169,14 @@ binlog purge"; break;
}
if(errmsg)
- send_error(&thd->net, 0, errmsg);
+ {
+ send_error(&thd->net, 0, errmsg);
+ return 1;
+ }
else
send_ok(&thd->net);
+
+ return 0;
}
void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)