1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/tests
Gleb Shchepa 22c2d06d3d backport from mysql-trunk
BUG #11754979 - 46675: ON DUPLICATE KEY UPDATE AND UPDATECOUNT() POSSIBLY WRONG 

The mysql_affected_rows() client call returns 3 instead of 2 on
INSERT ... ON DUPLICATE KEY UPDATE query with a duplicated key value.

The fix for the old bug #29692 was incomplete: unnecessary double
increment of "touched" rows still happened.

This bugfix removes:
1) unneeded increment of "touched" rows and
2) useless double resetting of auto-increment value.


sql/sql_insert.cc:
  write_record() function:
  Unneeded increment of "touched" rows and useless double resetting
  of auto-increment value has been removed.
tests/mysql_client_test.c:
  New test case.
2011-08-03 17:53:44 +04:00
..
2000-07-31 21:29:14 +02:00
2000-07-31 21:29:14 +02:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2006-12-23 20:17:15 +01:00
2006-12-31 01:02:27 +01:00
2010-12-28 19:57:23 +01:00
2010-12-28 19:57:23 +01:00
2010-12-29 00:47:05 +01:00
2010-12-29 00:47:05 +01:00
2011-06-30 17:31:31 +02:00
2004-02-11 00:06:46 +01:00
2006-12-23 20:17:15 +01:00
2006-12-23 20:17:15 +01:00
2010-12-28 19:57:23 +01:00
2000-07-31 21:29:14 +02:00
2011-08-03 17:53:44 +04:00
2010-12-28 19:57:23 +01:00
2000-09-19 17:23:58 -06:00
2006-12-23 20:17:15 +01:00
2006-12-23 20:17:15 +01:00
2011-06-30 17:46:53 +02:00
2010-12-28 19:57:23 +01:00