mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #29692 Single row inserts can incorrectly report a huge number of row insertions
This bug was caused by unitialized value that was the result of a bad 5.0 merge. sql/sql_class.h: Readded comments lost in a bad merge. sql/sql_insert.cc: Fixed code to completely initialize (zero) the "COPY_INFO info" var in the same manner as the delayed write code. Readded a change that was lost in a bad merge. tests/mysql_client_test.c: Test case added for bug#29692.
This commit is contained in:
@@ -65,11 +65,23 @@ typedef struct st_user_var_events
|
||||
#define RP_LOCK_LOG_IS_ALREADY_LOCKED 1
|
||||
#define RP_FORCE_ROTATE 2
|
||||
|
||||
/*
|
||||
The COPY_INFO structure is used by INSERT/REPLACE code.
|
||||
The schema of the row counting by the INSERT/INSERT ... ON DUPLICATE KEY
|
||||
UPDATE code:
|
||||
If a row is inserted then the copied variable is incremented.
|
||||
If a row is updated by the INSERT ... ON DUPLICATE KEY UPDATE and the
|
||||
new data differs from the old one then the copied and the updated
|
||||
variables are incremented.
|
||||
The touched variable is incremented if a row was touched by the update part
|
||||
of the INSERT ... ON DUPLICATE KEY UPDATE no matter whether the row
|
||||
was actually changed or not.
|
||||
*/
|
||||
typedef struct st_copy_info {
|
||||
ha_rows records;
|
||||
ha_rows deleted;
|
||||
ha_rows updated;
|
||||
ha_rows copied;
|
||||
ha_rows records; /* Number of processed records */
|
||||
ha_rows deleted; /* Number of deleted records */
|
||||
ha_rows updated; /* Number of updated records */
|
||||
ha_rows copied; /* Number of copied records */
|
||||
ha_rows error_count;
|
||||
ha_rows touched; /* Number of touched records */
|
||||
enum enum_duplicates handle_duplicates;
|
||||
|
||||
Reference in New Issue
Block a user