Commit 9caa9f9c authored by unknown's avatar unknown

Fix for bug#6398 update of primary key fails

parent 78c4faa2
......@@ -40,6 +40,11 @@ SELECT * FROM t1 ORDER BY pk1;
pk1 attr1 attr2 attr3
3 1 NULL 9412
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;
SELECT * FROM t1;
pk1 attr1 attr2 attr3
......
......@@ -36,6 +36,8 @@ UPDATE t1 SET pk1=2 WHERE attr1=1;
SELECT * FROM t1 ORDER BY pk1;
UPDATE t1 SET pk1=pk1 + 1;
SELECT * FROM t1 ORDER BY pk1;
UPDATE t1 SET pk1=4 WHERE pk1 = 3;
SELECT * FROM t1 ORDER BY pk1;
# Delete the record
DELETE FROM t1;
......
This diff is collapsed.
......@@ -243,18 +243,19 @@ class ha_ndbcluster: public handler
NdbValue m_value[NDB_MAX_ATTRIBUTES_IN_TABLE];
bool m_use_write;
bool m_ignore_dup_key_not_supported;
bool retrieve_all_fields;
ha_rows rows_to_insert;
ha_rows rows_inserted;
ha_rows bulk_insert_rows;
bool bulk_insert_not_flushed;
ha_rows ops_pending;
bool skip_auto_increment;
bool blobs_pending;
bool m_primary_key_update;
bool m_retrieve_all_fields;
ha_rows m_rows_to_insert;
ha_rows m_rows_inserted;
ha_rows m_bulk_insert_rows;
bool m_bulk_insert_not_flushed;
ha_rows m_ops_pending;
bool m_skip_auto_increment;
bool m_blobs_pending;
// memory for blobs in one tuple
char *blobs_buffer;
uint32 blobs_buffer_size;
uint dupkey;
char *m_blobs_buffer;
uint32 m_blobs_buffer_size;
uint m_dupkey;
void set_rec_per_key();
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