Bug #16517 Changes made to batch file are ignored
Submitted: 15 Jan 2006 19:33 Modified: 16 Jan 2006 12:26
Reporter: Matt Borack Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.18-nt OS:Windows (Windows XP Pro)
Assigned to: CPU Architecture:Any

[15 Jan 2006 19:33] Matt Borack
Description:
When trying to get a batch file to execute successfully from the command line (using source filename), I will modify the file (using Notepad) in the attempt to correct my mistake, then execute the file again to check if my correction worked, and possibly repeat multiple times until I correct the mistake. After perhaps 5 iterations or so, I find that no matter what I do to the file, I still get an error. However, if I exit mysql and relogin, the batch file will execute successfully. 

I have rebooted and still get this after roughly 5 iterations. I've had this problem with different types of scripts: Creating tables, creating triggers, creating procedures. 

How to repeat:

Create a simple script to create a table but intentionally have it contain an error. From the mysql command line, use source file and you should get an error message. Change the file in a way that it will still create an error and then try to execute the file. Do this 5 or so times, then change the script so that it contains a valid script, and you should see that executing it will still produce an error.

One of my scripts looked something like the following

use abc;

delimiter //

drop procedure proc_test;
create procedure proc_test(pscreenname varchar(20))
begin
	insert into acct (screen_name, pwd, emailadrs) 
	values (pscreenname, 'password', 'A@B.COM');
end;//

delimiter ;
[15 Jan 2006 20:02] Hartmut Holzgraefe
not reproduceable on linux, maybe a windows-only problem?
[16 Jan 2006 12:26] MySQL Verification Team
I was unable to repeat the behavior reported:

C:\mysql\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database db1;
Query OK, 1 row affected (0.03 sec)

mysql> use db1
Database changed

mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
ERROR 1305 (42000): PROCEDURE db1.proc_test does not exist
mysql> source c:/s/bug16517.sql
Database changed
Query OK, 0 rows affected (0.01 sec)

mysql>