mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix result of ROW_COUNT() after 'EXECUTE prepstmt'. (Bug #14956)
mysql-test/r/ps.result: Add new results mysql-test/t/ps.test: Add new test sql/sql_parse.cc: Don't reset row_count after processing EXECUTE statement.
This commit is contained in:
@ -806,3 +806,10 @@ execute stmt;
|
||||
@@tx_isolation
|
||||
REPEATABLE-READ
|
||||
deallocate prepare stmt;
|
||||
create table t1 (id int);
|
||||
prepare ins_call from "insert into t1 (id) values (1)";
|
||||
execute ins_call;
|
||||
select row_count();
|
||||
row_count()
|
||||
1
|
||||
drop table t1;
|
||||
|
@ -843,3 +843,15 @@ execute stmt;
|
||||
deallocate prepare stmt;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug #14956: ROW_COUNT() returns incorrect result after EXECUTE of prepared
|
||||
# statement
|
||||
#
|
||||
create table t1 (id int);
|
||||
prepare ins_call from "insert into t1 (id) values (1)";
|
||||
execute ins_call;
|
||||
select row_count();
|
||||
drop table t1;
|
||||
|
||||
# End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user