diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-05-14 09:28:51 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-05-14 09:28:51 +0400 |
commit | 7752ccec48efdc6ce834065681868dc7e95f6bbd (patch) | |
tree | f19fd6d634984242eb5cb0583cf805e7ec43ebc9 /mysql-test/include | |
parent | 89aedeb06d3aef3e2212ab776e883672bc638a57 (diff) | |
download | mariadb-git-7752ccec48efdc6ce834065681868dc7e95f6bbd.tar.gz |
Patch for Bug#21818 (Return value of ROW_COUNT() is incorrect
for ALTER TABLE, LOAD DATA).
ROW_COUNT is now assigned according to the following rules:
- In my_ok():
- for DML statements: to the number of affected rows;
- for DDL statements: to 0.
- In my_eof(): to -1 to indicate that there was a result set.
We derive this semantics from the JDBC specification, where int
java.sql.Statement.getUpdateCount() is defined to (sic) "return the
current result as an update count; if the result is a ResultSet
object or there are no more results, -1 is returned".
- In my_error(): to -1 to be compatible with the MySQL C API and
MySQL ODBC driver.
- For SIGNAL statements: to 0 per WL#2110 specification. Zero is used
since that's the "default" value of ROW_COUNT in the diagnostics area.
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/ctype_numconv.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc index 959ca7dfeea..be82f67b9f8 100644 --- a/mysql-test/include/ctype_numconv.inc +++ b/mysql-test/include/ctype_numconv.inc @@ -457,6 +457,8 @@ select * from t1; show create table t1; drop table t1; +# Ensure that row_count() value is reset after drop table. +select 1; select hex(concat(row_count())); create table t1 as select concat(row_count()) as c1; show create table t1; |