Bug #9079 STORED PROC: Procedure execution fails if a table is created from within SProc
Submitted: 9 Mar 2005 16:31 Modified: 9 Mar 2005 18:08
Reporter: Disha Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.3-alpha-nt OS:Windows (Windows Server 2003)
Assigned to: CPU Architecture:Any

[9 Mar 2005 16:31] Disha
Description:
If a table say 'xxx' is created from within a procedure. After calling the procedure for first time it displays an error message "Table xxx doesn't exists"

How to repeat:
 Repro Steps  	: 

1. Use database 'test' i.e. execute the following SQL statement:
	     use test;
2. Create and Run the follwing query:

	Drop Procedure if exists sp1 // 
	Drop table if exists t123//
	Create procedure sp1 ()
	Begin

		Create table t123 (f1 decimal (64,30));

	End //

	Call sp1 ()//
			
3. Observe that the procedure execution displays the error message as,
		ERROR 1146 (42S02): Table 'test.t123' doesn't exist
				
 Expected Results: The procedure execution should complete without any errors
    
 Actual Results  : The execution fails with the following error: 
 ERROR 1146 (42S02): Table 'test.t123' doesn't exist

 Additional Info (if any) : We have observed that the table is actually getting created
[9 Mar 2005 18:08] Trudy Pelzer
This is a duplicate of Bug#8766.