Commit 56cf0995 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2745], fix in main, get is_index_unique to check if thd->killed is set

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@21288 c7de825b-a66e-492c-adef-691d508d4ae1
parent 6b2ea727
...@@ -2978,6 +2978,8 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in ...@@ -2978,6 +2978,8 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in
DBC* tmp_cursor1 = NULL; DBC* tmp_cursor1 = NULL;
DBC* tmp_cursor2 = NULL; DBC* tmp_cursor2 = NULL;
DBT key1, key2, val, packed_key1, packed_key2; DBT key1, key2, val, packed_key1, packed_key2;
u_int64_t cnt = 0;
THD* thd = ha_thd();
bzero(&key1, sizeof(key1)); bzero(&key1, sizeof(key1));
bzero(&key2, sizeof(key2)); bzero(&key2, sizeof(key2));
bzero(&val, sizeof(val)); bzero(&val, sizeof(val));
...@@ -3093,6 +3095,15 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in ...@@ -3093,6 +3095,15 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in
DB_NEXT DB_NEXT
); );
if (error && (error != DB_NOTFOUND)) { goto cleanup; } if (error && (error != DB_NOTFOUND)) { goto cleanup; }
cnt++;
if (cnt%10000) {
if (thd->killed) {
my_error(ER_QUERY_INTERRUPTED, MYF(0));
error = ER_QUERY_INTERRUPTED;
goto cleanup;
}
}
} }
error = 0; error = 0;
......
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