Bug #22435 Query browser doesn't working with delimiters other than ";"
Submitted: 18 Sep 2006 9:27 Modified: 18 Sep 2006 11:02
Reporter: Maxim Dikun Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.2.3. beta OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any
Tags: DELIMITER

[18 Sep 2006 9:27] Maxim Dikun
Description:
When using DELIMITER $$, Query Browser don't use new delimiter for splitting queries. It still use ;
Example:

Code created by 'Script -> Create Stored Procedure/Function' + 'RETURN 1;' line.
[SQL]
(*)DELIMITER $$

DROP FUNCTION IF EXISTS `fibertest`.`test` $$
CREATE FUNCTION `fibertest`.`test` () RETURNS INT
BEGIN
  RETURN 1;
(*)END $$

DELIMITER ;
[/SQL]

(*) <- Statements begins here

Because of this bug you can't create any stored functions/procedures using Query Browser.

How to repeat:
Just write any code that uses 'DELIMITER'

Suggested fix:
Check parsing functions. (Or add new functionality to them)
[18 Sep 2006 10:46] Valeriy Kravchuk
Thank you for a problem report. Sorry, but i just created the following function (in the SQL Query Area) withou any problems:

delimiter $$
create function test_delim() returns int
deterministic
begin
  return 1;
end$$

So, I do not understand how to repeat the behaviour you described.
[18 Sep 2006 11:02] Maxim Dikun
Ok. Your function works. But try to create EXACTLY that code:

DELIMITER $$

DROP FUNCTION IF EXISTS `fibertest`.`test` $$
CREATE FUNCTION `fibertest`.`test` () RETURNS INT
BEGIN
  RETURN 1;
END $$

DELIMITER ;

and there will be wrong splitting into statements.