Commit 435fa7de authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2563], have a test mode where errors are not printed to the log file when...

[t:2563], have a test mode where errors are not printed to the log file when fileops fails due to DB_LOCK_NOTGRANTED

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@20501 c7de825b-a66e-492c-adef-691d508d4ae1
parent b601a84b
......@@ -5977,7 +5977,7 @@ int ha_tokudb::delete_table(const char *name) {
TOKUDB_DBUG_ENTER("ha_tokudb::delete_table");
int error;
error = delete_or_rename_table(name, NULL, true);
if (error == DB_LOCK_NOTGRANTED) {
if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) {
sql_print_error("Could not delete table %s because \
another transaction has accessed the table. \
To drop the table, make sure no transactions touch the table.", name);
......@@ -5999,7 +5999,7 @@ int ha_tokudb::rename_table(const char *from, const char *to) {
TOKUDB_DBUG_ENTER("%s %s %s", __FUNCTION__, from, to);
int error;
error = delete_or_rename_table(from, to, false);
if (error == DB_LOCK_NOTGRANTED) {
if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) {
sql_print_error("Could not rename table from %s to %s because \
another transaction has accessed the table. \
To rename the table, make sure no transactions touch the table.", from, to);
......@@ -6531,7 +6531,7 @@ cleanup:
commit_txn(txn,0);
}
}
if (error == DB_LOCK_NOTGRANTED) {
if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) {
sql_print_error("Could not add indexes to table %s because \
another transaction has accessed the table. \
To add indexes, make sure no transactions touch the table.", share->table_name);
......@@ -6585,7 +6585,7 @@ cleanup:
commit_txn(txn,0);
}
}
if (error == DB_LOCK_NOTGRANTED) {
if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) {
sql_print_error("Could not drop indexes from table %s because \
another transaction has accessed the table. \
To drop indexes, make sure no transactions touch the table.", share->table_name);
......@@ -6841,7 +6841,7 @@ cleanup:
}
}
if (error == DB_LOCK_NOTGRANTED) {
if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) {
sql_print_error("Could not truncate table %s because \
another transaction has accessed the table. \
To truncate the table, make sure no transactions touch the table.", share->table_name);
......
......@@ -36,6 +36,7 @@ extern ulong tokudb_debug;
#define TOKUDB_DEBUG_LOCK 256
#define TOKUDB_DEBUG_LOCKRETRY 512
#define TOKUDB_DEBUG_CHECK_KEY 1024
#define TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS 2048
#define TOKUDB_TRACE(f, ...) \
printf("%d:%s:%d:" f, my_tid(), __FILE__, __LINE__, ##__VA_ARGS__);
......
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