summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-24 22:42:35 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-24 22:42:35 +0200
commit78829a5780d3e48da376c1ca4e62731da450c551 (patch)
tree6561f2b6f09662220b9965bb14d745f69a4ecd34 /sql/table.cc
parentd6ba8496175a2dd85d772f8486eb032c31969f59 (diff)
parent947b6b849d907dc0793f076aec7e553869db744f (diff)
downloadmariadb-git-78829a5780d3e48da376c1ca4e62731da450c551.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 01f96b5f93b..375f7a3f65f 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -343,6 +343,9 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
mysql_mutex_init(key_TABLE_SHARE_LOCK_ha_data,
&share->LOCK_ha_data, MY_MUTEX_INIT_FAST);
+ 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.
@@ -351,7 +354,8 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
{
share->table_map_id=
last_table_id.fetch_add(1, std::memory_order_relaxed);
- } while (unlikely(share->table_map_id == ~0UL));
+ } while (unlikely(share->table_map_id == ~0UL ||
+ share->table_map_id == 0));
}
DBUG_RETURN(share);
}