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

Fix syntax for 'SHOW COLUMNS FROM' on MySQL 8 #12759

Merged
merged 1 commit into from Apr 23, 2018
Merged

Conversation

jedix
Copy link

@jedix jedix commented Apr 23, 2018

Closing quotation mark in this line seem to be placed at the wrong place:

$allColumns = $db->fetchAll("SHOW COLUMNS FROM . $tableName");

Should be:

$allColumns = $db->fetchAll("SHOW COLUMNS FROM " . $tableName);

MySQL in versions < 8 ignores this error and assumes the dot indicates a database name before the tablename which apparently can be empty.

@sgiehl
Copy link
Member

sgiehl commented Apr 23, 2018

Good find 👍

@jedix
Copy link
Author

jedix commented Apr 23, 2018

This bug actually breaks Matomo on systems with MySQL 8. Installation fails on the last step and previously installed deployments just stop working.

@sgiehl sgiehl added the Bug For errors / faults / flaws / inconsistencies etc. label Apr 23, 2018
@sgiehl sgiehl added this to the 3.5.0 milestone Apr 23, 2018
@sgiehl sgiehl merged commit f69c1f6 into matomo-org:3.x-dev Apr 23, 2018
@sgiehl sgiehl changed the title Fix syntax vor 'SHOW COLUMNS FROM' Fix syntax for 'SHOW COLUMNS FROM' Apr 23, 2018
mattab added a commit that referenced this pull request Apr 23, 2018
mattab added a commit that referenced this pull request Apr 23, 2018
…"" (#12761)

* Revert "Fix syntax vor 'SHOW COLUMNS FROM' (#12759)"

This reverts commit f69c1f6.

* Revert "fix #12722 (#12756)"

This reverts commit 6c3ed18.

* Revert "When setting or resetting User ID, do not update the Visitor ID in the first party cookie (#12742)"

This reverts commit fdb161b.

* Revert "Show information in visitor profile if dataset was "truncated" (#12376)"

This reverts commit 14ba6a4.
@mattab mattab changed the title Fix syntax for 'SHOW COLUMNS FROM' Fix syntax for 'SHOW COLUMNS FROM' on MySQL 8 Apr 23, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…"" (matomo-org#12761)

* Revert "Fix syntax vor 'SHOW COLUMNS FROM' (matomo-org#12759)"

This reverts commit f69c1f6.

* Revert "fix matomo-org#12722 (matomo-org#12756)"

This reverts commit 6c3ed18.

* Revert "When setting or resetting User ID, do not update the Visitor ID in the first party cookie (matomo-org#12742)"

This reverts commit fdb161b.

* Revert "Show information in visitor profile if dataset was "truncated" (matomo-org#12376)"

This reverts commit 14ba6a4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants