Bug #10849 DELIMITER used multiple times in Batch fails
Submitted: 25 May 2005 1:47 Modified: 31 May 2005 17:30
Reporter: Steve K Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.0.4 OS:Microsoft Windows (Windows 2000)
Assigned to: Assigned Account CPU Architecture:Any

[25 May 2005 1:47] Steve K
When using the Delimiter command multiple times in a Batch file it appears to not finish and does return to a command prompt.

How to repeat:
### Start Here ###
SELECT 'Got Here';
SELECT 'Testing First Delimiter'//
SELECT 'Testing End First Delimiter';
SELECT 'Testing Second Delimiter'//
Select 'Testing End Second Delimiter';
### End here ###

Run the above script will execute correctly, however, it does not return to a prompt.  It could be stuck or just creates the appearance that it is stuck.
[25 May 2005 3:28] Miguel Solorzano
Actually the client hangs in both Linux and Windows with
that sequence.
Tested with BK 5.0.7 source.
[25 May 2005 9:01] Sergei Golubchik
Your mistake is that after DELIMITER ;/ you should use SELECT 'test';/  not SELECT 'test';
when fixing your script to use the correct delimiter it does not hang.

Of course it's still a bug that it hangs, a simplified test case is:

mysql> delimiter //
mysql> select 1; delimiter //
[31 May 2005 17:30] Sergei Golubchik
A duplicate of