What are you trying to achieve?
I am using the Db module with a mariadb database.
What do you get instead?
I receive an error stating Unknown column 'PRIMARY'
The issue stems from the Mysql driver building the following query
SHOW KEYS FROM my_table where key_name = "PRIMARY"
Maria db does not treat double quotes as string literals.
By changing the query to
SHOW KEYS FROM my_table where key_name = 'PRIMARY'
using single quotes the issues is resolved. This should not affect mysql db users as single quotes are string literals
Provide console output if related. Use -vvv mode for more details.
Provide test source code if related
Details
- Codeception version: 3.1.2
- PHP Version: 7.0
- Operating System: Unbuntu
- Installation type: Composer
- List of installed packages (
composer show)
- Suite configuration:
# paste suite config here
What are you trying to achieve?
I am using the
Dbmodule with a mariadb database.What do you get instead?
I receive an error stating
Unknown column 'PRIMARY'The issue stems from the Mysql driver building the following query
SHOW KEYS FROMmy_tablewhere key_name = "PRIMARY"Maria db does not treat double quotes as string literals.
By changing the query to
SHOW KEYS FROMmy_tablewhere key_name = 'PRIMARY'using single quotes the issues is resolved. This should not affect mysql db users as single quotes are string literals
# paste output here// paste testDetails
composer show)# paste suite config here