mariadb/storage
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
..
archive MDEV-11645: archive.archive fails in buildbot with valgrind (Use of uninitialised value) 2017-03-15 21:26:39 +05:30
blackhole MDEV-5120 Test suite test maria-no-logging fails 2014-09-30 20:31:14 +03:00
cassandra Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
connect Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
csv Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
example 5.5.40+ merge 2014-10-09 10:30:11 +02:00
federated MDEV-11597 Assertion when doing select from virtual column with impossible value 2017-01-11 09:19:45 +02:00
federatedx MDEV-11597 Assertion when doing select from virtual column with impossible value 2017-01-11 09:19:45 +02:00
heap MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_difference 2016-03-31 11:04:48 +04:00
innobase Bug#24397406 INNODB: ALGORITHM=INPLACE FAILS TO PROMOTE UNIQUE KEY TO CLUSTERED INDEX 2017-04-24 15:44:27 +03:00
maria Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
mroonga Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
myisam Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
myisammrg cleanup: remove Item::intro_version 2016-12-12 20:27:25 +01:00
oqgraph Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
perfschema Fix several compile warnings on Windows 2017-03-10 19:07:07 +00:00
rocksdb Rocksdb - disable tests that fail regularly on buildbot (MDEV-12474) 2017-04-07 17:00:51 +00:00
sequence Fix several compile warnings on Windows 2017-03-17 08:56:57 +00:00
sphinx mtr: make sphinx skipping a bit less verbose 2017-02-13 18:12:15 +01:00
spider Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
test_sql_discovery store/show vcols as item->print() 2016-12-12 20:35:41 +01:00
tokudb Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
xtradb Merge 10.1 into 10.2 2017-04-06 09:52:25 +03:00