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 /sql/protocol.cc | |
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 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index e036f255960..fd01e4a8885 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -210,7 +210,7 @@ net_send_ok(THD *thd, NET *net= &thd->net; uchar buff[MYSQL_ERRMSG_SIZE+10],*pos; bool error= FALSE; - DBUG_ENTER("my_ok"); + DBUG_ENTER("net_send_ok"); if (! net->vio) // hack for re-parsing queries { |