Commit 444fc1ce authored by unknown's avatar unknown

WL# 1728 Handler: use scanReadExclusive for scan update and delete



sql/ha_ndbcluster.cc:
  Modified next_result to process fetched records cached in NdbApi before asking NDB for more. 
  It should also NoCommit any pending operations before contacting NDB again.
  Added utility function define_read_attrs to set the fields that should be read.
sql/ha_ndbcluster.h:
  Add function define_read_attrs, used to set the fields to read
  Add get_nd_lock_type funciton ,to convert MySQL lock type to NDB lock type
  Always compile filtered scan function even if it's not used yet.
  Add variable ops_pending to keep track of "pending" update/delete operations.
parent 9d99ebe3
This diff is collapsed.
......@@ -152,6 +152,7 @@ class ha_ndbcluster: public handler
const char* get_unique_index_name(uint idx_no) const;
NDB_INDEX_TYPE get_index_type(uint idx_no) const;
NDB_INDEX_TYPE get_index_type_from_table(uint index_no) const;
int get_ndb_lock_type();
int pk_read(const byte *key, uint key_len,
byte *buf);
......@@ -162,12 +163,10 @@ class ha_ndbcluster: public handler
bool sorted, byte* buf);
int full_table_scan(byte * buf);
int next_result(byte *buf);
#if 0
int define_read_attrs(byte* buf, NdbOperation* op);
int filtered_scan(const byte *key, uint key_len,
byte *buf,
enum ha_rkey_function find_flag);
#endif
void unpack_record(byte *buf);
void set_dbname(const char *pathname);
......@@ -212,6 +211,7 @@ class ha_ndbcluster: public handler
ha_rows rows_to_insert;
ha_rows rows_inserted;
ha_rows bulk_insert_rows;
ha_rows ops_pending;
};
bool ndbcluster_init(void);
......
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