branches/zip: ha_innobase::add_index(): Do not merely check for a key name "PRIMARY".  If the table has a generated clustered index, also check for a UNIQUE INDEX containing no NULL columns.
branches/zip: ha_innobase::add_index(): Do not merely check for a
key name "PRIMARY".  If the table has a generated clustered index,
also check for a UNIQUE INDEX containing no NULL columns.

innobase_create_index_def(): Add the parameter key_primary.

innobase_create_key_def(): Check if the first index is a UNIQUE index
consisting of NOT NULL columns.

Fixing this bug revealed another one: FOREIGN KEY constraints
will be lost when a PRIMARY KEY is created.  This is the reason why
innodb.test will fail.

flynn1973/mariadb-aix,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,slanterns/server,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,ollie314/server,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server