mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
fix auto-increment in sub-key and insert ... select
This commit is contained in:
parent
e0ba590fc9
commit
6a933b2e08
6 changed files with 26 additions and 6 deletions
|
|
@ -3694,8 +3694,8 @@ void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows)
|
|||
MI_KEYDEF *key=share->keyinfo;
|
||||
for (i=0 ; i < share->base.keys ; i++,key++)
|
||||
{
|
||||
if (!(key->flag & HA_NOSAME) && ! mi_too_big_key_for_sort(key,rows) &&
|
||||
info->s->base.auto_key != i+1)
|
||||
if (!(key->flag & (HA_NOSAME|HA_AUTO_KEY)) &&
|
||||
! mi_too_big_key_for_sort(key,rows))
|
||||
{
|
||||
share->state.key_map&= ~ ((ulonglong) 1 << i);
|
||||
info->update|= HA_STATE_CHANGED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue