diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2019-01-23 20:16:21 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@mariadb.com> | 2019-01-23 20:16:21 +0200 |
commit | b22354680ef9c5ffeda91cba284ed236fbf3c31e (patch) | |
tree | 05c32833bb907f87669c2f4c5128323c7b343d04 /sql/table_cache.cc | |
parent | c2a4bfad223903931171c473c42646e93dd0e728 (diff) | |
download | mariadb-git-b22354680ef9c5ffeda91cba284ed236fbf3c31e.tar.gz |
merge 10.0 -> 10.1 to resolve MDEV-17803 conflicts.
Diffstat (limited to 'sql/table_cache.cc')
-rw-r--r-- | sql/table_cache.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/table_cache.cc b/sql/table_cache.cc index 6d190400217..b3cf6cd2892 100644 --- a/sql/table_cache.cc +++ b/sql/table_cache.cc @@ -1134,6 +1134,9 @@ void tdc_assign_new_table_id(TABLE_SHARE *share) DBUG_ASSERT(share); DBUG_ASSERT(tdc_inited); + DBUG_EXECUTE_IF("simulate_big_table_id", + if (last_table_id < UINT_MAX32) + last_table_id= UINT_MAX32 - 1;); /* There is one reserved number that cannot be used. Remember to change this when 6-byte global table id's are introduced. @@ -1141,7 +1144,7 @@ void tdc_assign_new_table_id(TABLE_SHARE *share) do { tid= my_atomic_add64_explicit(&last_table_id, 1, MY_MEMORY_ORDER_RELAXED); - } while (unlikely(tid == ~0UL)); + } while (unlikely(tid == ~0UL || tid == 0)); share->table_map_id= tid; DBUG_PRINT("info", ("table_id= %lu", share->table_map_id)); |