Bug #45714 | SOURCE command syntax error using DBI | ||
---|---|---|---|
Submitted: | 24 Jun 2009 15:50 | Modified: | 24 Jun 2009 17:20 |
Reporter: | Emma Griffiths | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connectors: DBD::mysql ( Perl ) | Severity: | S2 (Serious) |
Version: | 4.0011-1 | OS: | Linux (Ubuntu 9.04 Desktop) |
Assigned to: | CPU Architecture: | Any | |
Tags: | dbd, dbi, MySQL, SOURCE |
[24 Jun 2009 15:50]
Emma Griffiths
[24 Jun 2009 15:56]
Emma Griffiths
I forgot to copy them in, but each $sth is finished!
[24 Jun 2009 15:58]
Peter Laursen
To my best knowledge SOURCE is not a SQL statement (menas that server does not unerstand it). It is implemented in command line client only. Not in server and not in most other clients. Peter (not a MySQL person)
[24 Jun 2009 16:09]
Emma Griffiths
Thanks for that info, Peter! I wont hold my breath hoping for a solution then, but it would be great to know a work around (I've had problems trying to get things to execute on the command line properly using perl). Emma
[24 Jun 2009 17:20]
Valeriy Kravchuk
Sorry, but this is not a bug. SOURCE is mysql command line client's command. See http://dev.mysql.com/doc/refman/5.1/en/mysql-commands.html for the details. If you want to implement it in Perl, you'll have to parse the command, extract filename from it, then open file, parse individual SQL statements/commands there and send them to server one by one. Check mysql command line client source code for some ideas on how to do that.