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

Warning about returning is not supported when using MariaDB #5557

Open
siakc opened this issue Apr 25, 2023 · 2 comments
Open

Warning about returning is not supported when using MariaDB #5557

siakc opened this issue Apr 25, 2023 · 2 comments

Comments

@siakc
Copy link

siakc commented Apr 25, 2023

Documentation notes 'If you want to use a MariaDB instance, you can use the mysql driver.'
So we are using client: 'mysql' to initialize the client.
When the app starts and executes a query containing RETURNING clause, we see '.returning() is not supported by mysql and will not have any effect.' in the log.
It also seems that in this case returning is effectively ignored.
As knex claims that it supports MariaDB. This should not be the case as MariaDB supports returning.

Knex version: Latest
Database + version: MariaDB any
OS: any

@siakc
Copy link
Author

siakc commented Sep 30, 2023

Further investigation showed that it is actually working in mariadb contradicting my initial assessment. The only problem is the incorrect warning.

@siakc
Copy link
Author

siakc commented Dec 21, 2023

The reason is Mariadb like Mysql returns the auto increment primary key field. So returning IS being ignored.

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

1 participant