mariadb/storage/innobase
Marko Mäkelä 01389ee8ac Bug#24397406 INNODB: ALGORITHM=INPLACE FAILS TO PROMOTE UNIQUE KEY TO CLUSTERED INDEX
When a table has no PRIMARY KEY, but there is a UNIQUE INDEX
defined on NOT NULL columns that are not column prefixes,
that unique index must be treated as the primary key.

This property was being violated by InnoDB when a column was changed
to NOT NULL, such that a UNIQUE INDEX on that column became eligible
to being treated as a primary key.

innobase_create_key_defs(): Instead of checking each ADD [UNIQUE] INDEX
request, check if a GEN_CLUST_INDEX can be replaced with any unique index
in the altered_table definition. So, we can have new_primary even
if n_add==0.

prepare_inplace_alter_table_dict(): When the table is not being rebuilt,
assert that TABLE_SHARE::primary_key is not changing.

RB: 13595
Reviewed-by: Kevin Lewis <kevin.lewis@oracle.com>
2017-04-24 15:44:27 +03:00
..
btr MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
buf MDEV-12545 Reduce the amount of fil_space_t lookups 2017-04-21 18:12:10 +03:00
data MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
dict Fix some InnoDB type mismatch 2017-04-21 18:04:02 +03:00
eval MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL 2017-03-17 12:42:07 +02:00
fil Fix a crash when page_compression fails during IMPORT TABLESPACE 2017-04-21 18:44:37 +03:00
fsp Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
fts BUG#24331265 MEMORY LEAK IN SOME INNODB FTS TESTS 2017-04-24 15:33:51 +03:00
fut MDEV-12270 Port MySQL 8.0 Bug#21141390 REMOVE UNUSED FUNCTIONS AND CONVERT GLOBAL SYMBOLS TO STATIC 2017-03-17 12:48:50 +02:00
gis Minor code cleanup. 2017-04-17 03:20:34 +03:00
ha MDEV-12270 Port MySQL 8.0 Bug#21141390 REMOVE UNUSED FUNCTIONS AND CONVERT GLOBAL SYMBOLS TO STATIC 2017-03-17 12:48:50 +02:00
handler Bug#24397406 INNODB: ALGORITHM=INPLACE FAILS TO PROMOTE UNIQUE KEY TO CLUSTERED INDEX 2017-04-24 15:44:27 +03:00
ibuf MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
include BUG#23477773 OPTION TO TURN OFF/ON DEADLOCK CHECKER 2017-04-24 15:09:18 +03:00
lock BUG#23477773 OPTION TO TURN OFF/ON DEADLOCK CHECKER 2017-04-24 15:09:18 +03:00
log MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
mach MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL 2017-03-17 12:42:07 +02:00
mem MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL 2017-03-17 12:42:07 +02:00
mtr MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL 2017-03-17 12:42:07 +02:00
mysql-test/storage_engine MDEV-11782: Redefine the innodb_encrypt_log format 2017-02-15 08:07:20 +02:00
os MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
page MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
pars Remove unused tokens from the InnoDB SQL parser. 2017-04-17 03:20:34 +03:00
que MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL 2017-03-17 12:42:07 +02:00
read Merge InnoDB 5.7 from mysql-5.7.9. 2016-09-02 13:22:28 +03:00
rem MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
row Bug #24347476 HIGH PRIORITY TRX FAILED TO KILL LOW PRIORITY TRX WHEN FOREIGN KEYS ARE INVOLVED 2017-04-24 15:29:12 +03:00
srv MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
sync MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
trx MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
usr MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL 2017-03-17 12:42:07 +02:00
ut MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
bzip2.cmake cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00
CMakeLists.txt cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00
compile-innodb move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Google move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Percona move to storage/innobase 2015-05-04 19:17:21 +02:00
innodb.cmake cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00
lz4.cmake cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00
lzma.cmake cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00
lzo.cmake cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00
plugin_exports Solaris compilation failure: xtradb is linked in statically, ha_innodb.so needs 2014-05-01 14:05:52 +02:00
snappy.cmake cleanup: innodb files in cmake/ 2017-03-29 00:40:22 +02:00