MySQL Forums
Forum List  »  InnoDB clusters

Re: Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key
Posted by: Frederic Descamps
Date: May 23, 2017 11:20AM

Hi Sivan,

Could you run this query and check the output ?

SELECT tables.table_schema , tables.table_name , tables.engine
FROM information_schema.tables
LEFT JOIN (
SELECT table_schema , table_name
FROM information_schema.statistics
GROUP BY table_schema, table_name, index_name HAVING
SUM( case when non_unique = 0 and nullable != 'YES' then 1 else 0 end ) = count(*) ) puks
ON tables.table_schema = puks.table_schema and tables.table_name = puks.table_name
WHERE puks.table_name is null
AND tables.table_type = 'BASE TABLE' AND Engine="InnoDB";

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key
1083
May 23, 2017 11:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.