Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add primary key to creation table (mysql) #194

Open
AlvaroVega opened this issue Sep 14, 2023 · 2 comments
Open

Add primary key to creation table (mysql) #194

AlvaroVega opened this issue Sep 14, 2023 · 2 comments

Comments

@AlvaroVega
Copy link
Member

percona/mysql does not allow create a table without primary key

2023-09-14T08:05:05.589933Z 48 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of DML command on a table (cb004011.sub401_FLOW0_AZUL) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

@AlvaroVega
Copy link
Member Author

def create_table(self, name, database_name, fields):
"""
create a new table per column type
:param name:
:param database_name:
:param fields:
"""
self.table = name
cur = self.__query("%s `%s`.`%s` %s;" % (MYSQL_CREATE_TABLE, database_name, self.table, fields))
cur.close()

@fgalan
Copy link
Member

fgalan commented Sep 14, 2023

De momento hemos dejado el MySQL de DEVEL en una configuración con PERMISSIVE que evita el problema.

Pero entiendo que si algún día queremos quitar ese PERMISIVE, resolver este issue se volverá necesario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants