summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.h
diff options
context:
space:
mode:
authorunknown <mskold/marty@mysql.com/linux.site>2007-10-02 13:36:13 +0200
committerunknown <mskold/marty@mysql.com/linux.site>2007-10-02 13:36:13 +0200
commitc19a8c0631daf263893672c70181cdc246e171c9 (patch)
treeac03e5759d3663afb231f3f0787637db87367d67 /sql/ha_ndbcluster.h
parentf7886540120d6c9d564053ee25709f07fd49a784 (diff)
downloadmariadb-git-c19a8c0631daf263893672c70181cdc246e171c9.tar.gz
Bug#25817 UPDATE IGNORE doesn't check write_set when checking unique indexes: Added checks
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r--sql/ha_ndbcluster.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index 81cbdcd8fea..324969ad374 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -59,6 +59,12 @@ typedef struct ndb_index_data {
bool null_in_unique_index;
} NDB_INDEX_DATA;
+typedef enum ndb_write_op {
+ NDB_INSERT = 0,
+ NDB_UPDATE = 1,
+ NDB_PK_UPDATE = 2
+} NDB_WRITE_OP;
+
typedef struct st_ndbcluster_share {
THR_LOCK lock;
pthread_mutex_t mutex;
@@ -251,7 +257,7 @@ private:
const NdbOperation *first,
const NdbOperation *last,
uint errcode);
- int peek_indexed_rows(const byte *record, bool check_pk);
+ int peek_indexed_rows(const byte *record, NDB_WRITE_OP write_op);
int unique_index_read(const byte *key, uint key_len,
byte *buf);
int ordered_index_scan(const key_range *start_key,
@@ -286,6 +292,7 @@ private:
int get_ndb_blobs_value(NdbBlob *last_ndb_blob, my_ptrdiff_t ptrdiff);
int set_primary_key(NdbOperation *op, const byte *key);
int set_primary_key_from_record(NdbOperation *op, const byte *record);
+ bool check_index_fields_in_write_set(uint keyno);
int set_index_key_from_record(NdbOperation *op, const byte *record,
uint keyno);
int set_bounds(NdbIndexScanOperation*, const key_range *keys[2], uint= 0);