• marko's avatar
    branches/zip: ha_innobase::add_index(): Do not merely check for a · 2c660584
    marko authored
    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.
    2c660584
ha_innodb.cc 262 KB