mycli icon indicating copy to clipboard operation
mycli copied to clipboard

favorite_queries as a SOURCE command

Open ericdp opened this issue 4 years ago • 0 comments

in ~/.myclirc file I have

[favorite_queries]
q1 = '''SOURCE /Users/eric/InWork/sql/q1.sql;'''

Then attempting to list and run it, I get error 1064. Any ideas if the SOURCE command is allowed here? or do I have to include the SQL query code itself? Or do I have the above configuration wrong?

MySQL [email protected]:(none)> \f
+------+---------------------------------------------------+
| Name | Query                                             |
+------+---------------------------------------------------+
| q1  | SOURCE /Users/eric/InWork/sql/q1.sql; |
+------+---------------------------------------------------+

MySQL [email protected]:(none)> \f q1
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SOURCE /Users/eric/InWork/sql/q1.sql' at line 1")

ericdp avatar Jan 06 '22 22:01 ericdp