Description:
Presents exactly the same as Bug# 44985 (http://bugs.mysql.com/bug.php?id=44985), but that bug was supposedly fixed in 6.1.2. This behavior happens in 6.1.3 (using Visual Studio 2008 SP1).
How to repeat:
Test Case:
mysql> create database Test;
Query OK, 1 row affected (0.06 sec)
mysql> use Test;
Database changed
mysql> create table MyTest (Id int unsigned auto_increment, primary key (Id));
Query OK, 0 rows affected (0.08 sec)
mysql> delimiter //
mysql> create procedure add_MyTest(inout Id int unsigned) begin insert MyTest values
(default); select LAST_INSERT_ID() into Id; end //
Query OK, 0 rows affected (0.05 sec)
mysql> delimiter ;
mysql> select * from MyTest;
Empty set (0.00 sec)
mysql> set @Id = 0;
Query OK, 0 rows affected (0.00 sec)
mysql> call add_MyTest(@Id);
Query OK, 0 rows affected (0.06 sec)
mysql> select @Id;
+------+
| @Id |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql> select * from MyTest;
+----+
| Id |
+----+
| 1 |
+----+
1 row in set (0.00 sec)
mysql>
Create an "ADO.NET Entity Data Model" of the Test database, check (include) all Tables / Stored
Procedures.
The .edmx file created by the wizard will come up after the wizard is finished.
Right-click on the MyTest table, and choose Stored Procedure Mapping.
Under Functions, click the box titled "<Select Insert Function>", select add_MyTest from
the drop-down list.
No parameters are available, and there should be parameters. I have also tried this with one of my normal database tables to the same effect.