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

USE commands breaking laravel functionality #4628

Closed
4 tasks
mar777121 opened this issue Aug 28, 2024 · 3 comments · Fixed by #4629
Closed
4 tasks

USE commands breaking laravel functionality #4628

mar777121 opened this issue Aug 28, 2024 · 3 comments · Fixed by #4629

Comments

@mar777121
Copy link

mar777121 commented Aug 28, 2024

Hello,

  • A clear description of the issue
    php artisan migrate (in laravel) failing with:

    SQLSTATE[42000]: Syntax error or access violation: 1148 Unable to parse: use database_name; (SQL: select * from information_schema.tables where table_schema = database_name and table_name = migrations and table_type = 'BASE TABLE')

  • ProxySQL version
    latest 2.6.4 dockerized version

  • The steps to reproduce the issue
    use stock laravel, run a php artisan migrate command

  • The full ProxySQL error log (default location: /var/lib/proxysql/proxysql.log)
    no error logs in ProxySQL log

2.6.3 dockerized version works fine

Best

@renecannao
Copy link
Contributor

Hi @mar777121 .
I am sorry to read about this issue.

Indeed in 2.6.4 we improved the way USE commands are parsed, and perhaps we didn't consider any edge case.
Can you please provide the steps to reproduce it?
Thanks!

@mar777121
Copy link
Author

Hi @mar777121 . I am sorry to read about this issue.

Indeed in 2.6.4 we improved the way USE commands are parsed, and perhaps we didn't consider any edge case. Can you please provide the steps to reproduce it? Thanks!

  • laravel installed, using proxysql in front
  • run php artisan migrate command from command line

@renecannao
Copy link
Contributor

It seems @JavierJF identified the issue.
We are already working on a fix

renecannao added a commit that referenced this issue Aug 29, 2024
Trailing semicolon are now removed.

This commit also ensure that an error is returned if `USE` is part
of a multi-statement.
renecannao added a commit that referenced this issue Aug 29, 2024
Removing trailing semicolon from `USE` #4628
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

Successfully merging a pull request may close this issue.

2 participants