From 444fc1ce984243126e6912bd584966269ad44fa7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 May 2004 14:12:28 +0200 Subject: 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. --- sql/ha_ndbcluster.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/ha_ndbcluster.h') diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index afb62b1347b..5d8c0a078b2 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -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); -- cgit v1.2.1