#39306 [Bgs]: Changing Delimiter
| From: | ctingley at mediagrids dot com | Date: | Mon, 30 Oct 2006 14:29:19 +0000 |
| Subject: | #39306 [Bgs]: Changing Delimiter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104181@lists.php.net to get a copy of this message | ||
ID: 39306
User updated by: ctingley at mediagrids dot com
Reported By: ctingley at mediagrids dot com
Status: Bogus
Bug Type: MySQL related
Operating System: Windows
PHP Version: 5.1.6
New Comment:
Appologies! I have just discovered that it is my multiline sql parser
that is executing a mysql_query every time it reaches a ;.
Previous Comments:
------------------------------------------------------------------------
[2006-10-30 13:59:08] tony2001@php.net
The delimiter has to be changed when using command line interface to
MySQL.
In PHP it's not required, stored procedures and functions can be
created without changing it.
------------------------------------------------------------------------
[2006-10-30 13:44:25] ctingley at mediagrids dot com
This is currently unsupported, but i imagine something similar should
work:
<?php
$sql = "DELIMITER //";
mysql_query($sql);
?>
Returns the error:
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 'DELIMITER
//' at line 1
------------------------------------------------------------------------
[2006-10-30 12:27:10] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-10-30 12:20:58] ctingley at mediagrids dot com
Description:
------------
It appears to be unable to change the MySQL delimiter using PHP. This
causes a problem when trying to automate schema creation, especially
when trying to create stored procedures.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39306&edit=1