Bug #34700 | no way to get row_count() info when using prepared statements | ||
---|---|---|---|
Submitted: | 20 Feb 2008 18:49 | Modified: | 22 Feb 2008 14:04 |
Reporter: | Joao Pedro Paula Pannain Souza | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Prepared statements | Severity: | S2 (Serious) |
Version: | 5.0.51 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[20 Feb 2008 18:49]
Joao Pedro Paula Pannain Souza
[20 Feb 2008 19:06]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior: create procedure p1() begin create table if not exists t1(id int); insert into t1 values(1); set @SQLQuery = ' update t1 set id=10 '; PREPARE SQLExec FROM @SQLQuery; EXECUTE SQLExec; select ROW_COUNT(); DEALLOCATE PREPARE SQLExec; end | call p1(); ROW_COUNT() 1
[22 Feb 2008 14:04]
Joao Pedro Paula Pannain Souza
I test with your example and give me return right now. But I put the row_count after the Execute and are giving the same error. But now its working. Thanks a lot. Parse the script of the store procedure i'm using are: PREPARE SQLExec FROM @SQLQuery; EXECUTE SQLExec; select ROW_COUNT() into SQLResult; DEALLOCATE PREPARE SQLExec; if SQLResult > 0 then select 'Ok!' as Message; else select 'Not Ok!' as Message; end if;