"delimiter" fails when script invoked with "source"

Subject: "delimiter" fails when script invoked with "source"

>Description:
When "delimiter" is used to change the default delimiter in mysql,
its behaviour is different when it's invoked in batch mode (mysql < script_file)
or within the program, with the "source" command.
in this latter case, everything until the next occurrence of "delimiter"
in the script is apparently taken as the delimiter itself.

Bug confirmed in 5.0.7, 5.0.10, 5.0.11, 5.0.12 (Linux) and 5.0.2 (Windows)

>How-To-Repeat:
this script (test.mysql):

delimiter //
select now() //
delimiter ;
select version() ;

will execute correctly when launched by "mysql < test.mysql"
$ mysql -t < test.mysql
+---------------------+
| now() |
+---------------------+
| 2005-08-09 11:44:09 |
+---------------------+
+----------------------------------+
| version() |
+----------------------------------+
| 5.0.12-beta-nightly-20050806-log |
+----------------------------------+

But when invoked inside the monitor, things change:
mysql> source test.mysql
+----------------------------------+
| version() |
+----------------------------------+
| 5.0.12-beta-nightly-20050806-log |
+----------------------------------+
1 row in set (0.00 sec)

Empty set (0.01 sec)

mysql> select now();
-> //
-> \c
mysql> select now() //
-> ;
-> \q
Bye

>Fix:
No fix available

Bye
Silvano Mastice



--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs [at] m.gmane.org
Silvano Mastice [ Di, 09 August 2005 14:19 ] [ ID #914972 ]

Re: "delimiter" fails when script invoked with "source"

On Tue, Aug 09, 2005 at 02:19:14PM +0200, Silvano Mastice wrote:
> Subject: "delimiter" fails when script invoked with "source"

This has already been reported to our bug system, and is Bug #11523.
You can find it at http://bugs.mysql.com/11523.

(The description of the bug is a little different from yours, but it is
the same bug.)

Thanks.

Jim Winstead
MySQL Inc.

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs [at] m.gmane.org
Jim Winstead [ Di, 09 August 2005 16:08 ] [ ID #914973 ]
Datenbanken » gmane.comp.db.mysql.bugs » "delimiter" fails when script invoked with "source"

Vorheriges Thema: mysql 14.12 Distrib 5.0.10-beta crashes on complex join query (similar to bug 12392 ?)
Nächstes Thema: MySQL 4.1.13-debian + large HEAP table