summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-10-08 21:50:05 +0300
committerunknown <monty@narttu.mysql.fi>2003-10-08 21:50:05 +0300
commit13d46a6aa52c4f8e46865030e5197d912a64d4eb (patch)
treecaac541df5c696ac2dd3b9e21880442e8961b4dc /sql/sql_db.cc
parentf67f80b04276a6b6b8eb2f77d34b354b9ad5d489 (diff)
downloadmariadb-git-13d46a6aa52c4f8e46865030e5197d912a64d4eb.tar.gz
Indentation cleanups
Remove wait_if_global_read_lock on commit as this can cause deadlocks BUILD/FINISH.sh: Cleanup BUILD/SETUP.sh: Cleanup BUILD/compile-pentium-valgrind-max: Don't write message twice mysql-test/r/innodb.result: Removed failure as this can cause deadlocks mysql-test/r/rpl_max_relay_size.result: Make test repeatable mysql-test/t/innodb.test: Removed failure as this can cause deadlocks mysql-test/t/rpl_max_relay_size.test: Removed failure as this can cause deadlocks sql/handler.cc: Remove wait_if_global_read_lock as this can cause deadlocks sql/opt_range.cc: Indentation cleanup sql/sql_db.cc: Comment cleanup sql/sql_parse.cc: Comment cleanup sql/sql_repl.cc: Indentation cleanup sql/sql_select.cc: Indentation cleanup
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index d48022f5829..cd0445b42e2 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -393,16 +393,16 @@ exit:
start_waiting_global_read_lock(thd);
/*
If this database was the client's selected database, we silently change the
- client's selected database to nothing (to have an empty SELECT DATABASE() in
- the future). For this we free() thd->db and set it to 0. But we don't do
+ client's selected database to nothing (to have an empty SELECT DATABASE()
+ in the future). For this we free() thd->db and set it to 0. But we don't do
free() for the slave thread. Indeed, doing a x_free() on it leads to nasty
problems (i.e. long painful debugging) because in this thread, thd->db is
the same as data_buf and db of the Query_log_event which is dropping the
- database. So if you free() thd->db, you're freeing data_buf. You set thd->db
- to 0 but not data_buf (thd->db and data_buf are two distinct pointers which
- point to the same place). Then in ~Query_log_event(), we have
- 'if (data_buf) free(data_buf)'
- data_buf is !=0 so this makes a DOUBLE free().
+ database. So if you free() thd->db, you're freeing data_buf. You set
+ thd->db to 0 but not data_buf (thd->db and data_buf are two distinct
+ pointers which point to the same place). Then in ~Query_log_event(), we
+ have 'if (data_buf) free(data_buf)' data_buf is !=0 so this makes a
+ DOUBLE free().
Side effects of this double free() are, randomly (depends on the machine),
when the slave is replicating a DROP DATABASE:
- garbage characters in the error message: