Commit 700da579 authored by mskold@mysql.com's avatar mskold@mysql.com

Fix for bug#6398 update of primary key fails

parent 4650f0ac
...@@ -40,6 +40,11 @@ SELECT * FROM t1 ORDER BY pk1; ...@@ -40,6 +40,11 @@ SELECT * FROM t1 ORDER BY pk1;
pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3
3 1 NULL 9412 3 1 NULL 9412
9412 9413 17 9413 9412 9413 17 9413
UPDATE t1 SET pk1=4 WHERE pk1 = 3;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1 attr2 attr3
4 1 NULL 9412
9412 9413 17 9413
DELETE FROM t1; DELETE FROM t1;
SELECT * FROM t1; SELECT * FROM t1;
pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3
......
...@@ -36,6 +36,8 @@ UPDATE t1 SET pk1=2 WHERE attr1=1; ...@@ -36,6 +36,8 @@ UPDATE t1 SET pk1=2 WHERE attr1=1;
SELECT * FROM t1 ORDER BY pk1; SELECT * FROM t1 ORDER BY pk1;
UPDATE t1 SET pk1=pk1 + 1; UPDATE t1 SET pk1=pk1 + 1;
SELECT * FROM t1 ORDER BY pk1; SELECT * FROM t1 ORDER BY pk1;
UPDATE t1 SET pk1=4 WHERE pk1 = 3;
SELECT * FROM t1 ORDER BY pk1;
# Delete the record # Delete the record
DELETE FROM t1; DELETE FROM t1;
......
This diff is collapsed.
...@@ -243,18 +243,19 @@ class ha_ndbcluster: public handler ...@@ -243,18 +243,19 @@ class ha_ndbcluster: public handler
NdbValue m_value[NDB_MAX_ATTRIBUTES_IN_TABLE]; NdbValue m_value[NDB_MAX_ATTRIBUTES_IN_TABLE];
bool m_use_write; bool m_use_write;
bool m_ignore_dup_key_not_supported; bool m_ignore_dup_key_not_supported;
bool retrieve_all_fields; bool m_primary_key_update;
ha_rows rows_to_insert; bool m_retrieve_all_fields;
ha_rows rows_inserted; ha_rows m_rows_to_insert;
ha_rows bulk_insert_rows; ha_rows m_rows_inserted;
bool bulk_insert_not_flushed; ha_rows m_bulk_insert_rows;
ha_rows ops_pending; bool m_bulk_insert_not_flushed;
bool skip_auto_increment; ha_rows m_ops_pending;
bool blobs_pending; bool m_skip_auto_increment;
bool m_blobs_pending;
// memory for blobs in one tuple // memory for blobs in one tuple
char *blobs_buffer; char *m_blobs_buffer;
uint32 blobs_buffer_size; uint32 m_blobs_buffer_size;
uint dupkey; uint m_dupkey;
void set_rec_per_key(); void set_rec_per_key();
void records_update(); void records_update();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment