diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2004-03-15 21:36:16 +0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2004-03-15 21:36:16 +0400 |
commit | 1d3b16335a824df832bb94c447248cef925bdfaf (patch) | |
tree | 0cf15fc15f8655c51809614f856f64a00c8abb5a /client | |
parent | 1b81fcf8ca993a4aac88492f1332868b0fea9233 (diff) | |
download | mariadb-git-1d3b16335a824df832bb94c447248cef925bdfaf.tar.gz |
actions for bug
#2709 Affected Rows for ON DUPL. KEY undocumented, perheps illogical
1. added COPY_INFO::updated to work with it in
'insert .. on duplicate' instead of COPY_INFO::deleted
2. added affected rows to output of "info:" in mysqltest.c
client/mysqltest.c:
added "affected rows" to output of "info : "..
mysql-test/r/insert_update.result:
added tests for affected rows with insert .. duplicate (bug #2709)
mysql-test/t/insert_update.test:
added tests for affected rows with insert .. duplicate (bug #2709)
sql/sql_class.h:
added COPY_INFO::updated
sql/sql_insert.cc:
get write_record to work with COPY_INFO::updated instead of
COPY_INFO::deleted for 'insert ... duplicate' statement
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index f30af82dabd..313850557f6 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2331,11 +2331,17 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags) mysql_free_result(warn_res); } } - if (!disable_info && mysql_info(mysql)) + if (!disable_info) { - dynstr_append(ds, "info: "); - dynstr_append(ds, mysql_info(mysql)); - dynstr_append_mem(ds, "\n", 1); + char buf[40]; + sprintf(buf,"affected rows: %ld\n",mysql_affected_rows(mysql)); + dynstr_append(ds, buf); + if (mysql_info(mysql)) + { + dynstr_append(ds, "info: "); + dynstr_append(ds, mysql_info(mysql)); + dynstr_append_mem(ds, "\n", 1); + } } } |