1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Enabled usage of new system variables for ndb

- ndb_use_exact_count
  - ndb_autoincrement_prefetch_sz
  - ndb_use_transactions
  - ndb_force_send
moved "inlined" functions to .cc file since they are virtual anyways
enabled printout od ndb errors in warnings even if mapping existst to mysql error code


sql/ha_ndbcluster.h:
  Enabled usage of new system variables for ndb
    - ndb_use_exact_count
    - ndb_autoincrement_prefetch_sz
    - ndb_use_transactions
    - ndb_force_send
  moved "inlined" functions to .cc file since they are virtual anyways
sql/mysqld.cc:
  Enabled usage of new system variables for ndb
    - ndb_use_exact_count
    - ndb_autoincrement_prefetch_sz
    - ndb_use_transactions
    - ndb_force_send
sql/set_var.cc:
  Enabled usage of new system variables for ndb
    - ndb_use_exact_count
    - ndb_autoincrement_prefetch_sz
    - ndb_use_transactions
    - ndb_force_send
sql/sql_class.h:
  Enabled usage of new system variables for ndb
    - ndb_use_exact_count
    - ndb_autoincrement_prefetch_sz
    - ndb_use_transactions
    - ndb_force_send
This commit is contained in:
unknown
2004-11-17 08:15:53 +00:00
parent 692311f53c
commit c617037b23
5 changed files with 223 additions and 89 deletions

View File

@ -118,15 +118,14 @@ class ha_ndbcluster: public handler
int reset();
int external_lock(THD *thd, int lock_type);
int start_stmt(THD *thd);
const char * table_type() const { return("ndbcluster");}
const char * table_type() const;
const char ** bas_ext() const;
ulong table_flags(void) const { return m_table_flags; }
ulong table_flags(void) const;
ulong index_flags(uint idx, uint part, bool all_parts) const;
uint max_supported_record_length() const { return NDB_MAX_TUPLE_SIZE; };
uint max_supported_keys() const { return MAX_KEY; }
uint max_supported_key_parts() const
{ return NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY; };
uint max_supported_key_length() const { return NDB_MAX_KEY_SIZE;};
uint max_supported_record_length() const;
uint max_supported_keys() const;
uint max_supported_key_parts() const;
uint max_supported_key_length() const;
int rename_table(const char *from, const char *to);
int delete_table(const char *name);
@ -135,28 +134,9 @@ class ha_ndbcluster: public handler
THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
bool low_byte_first() const
{
#ifdef WORDS_BIGENDIAN
return FALSE;
#else
return TRUE;
#endif
}
bool has_transactions() { return TRUE; }
const char* index_type(uint key_number) {
switch (get_index_type(key_number)) {
case ORDERED_INDEX:
case UNIQUE_ORDERED_INDEX:
case PRIMARY_KEY_ORDERED_INDEX:
return "BTREE";
case UNIQUE_INDEX:
case PRIMARY_KEY_INDEX:
default:
return "HASH";
}
}
bool low_byte_first() const;
bool has_transactions();
const char* index_type(uint key_number);
double scan_time();
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
@ -165,7 +145,7 @@ class ha_ndbcluster: public handler
static Thd_ndb* seize_thd_ndb();
static void release_thd_ndb(Thd_ndb* thd_ndb);
uint8 table_cache_type() { return HA_CACHE_TBL_NOCACHE; }
uint8 table_cache_type();
private:
int alter_table_name(const char *from, const char *to);
@ -256,6 +236,10 @@ class ha_ndbcluster: public handler
char *m_blobs_buffer;
uint32 m_blobs_buffer_size;
uint m_dupkey;
bool m_ha_not_exact_count;
bool m_force_send;
ha_rows m_autoincrement_prefetch;
bool m_transaction_on;
void set_rec_per_key();
void records_update();
@ -265,6 +249,8 @@ class ha_ndbcluster: public handler
void no_uncommitted_rows_reset(THD *);
friend int execute_no_commit(ha_ndbcluster*, NdbConnection*);
friend int execute_commit(ha_ndbcluster*, NdbConnection*);
friend int execute_no_commit_ie(ha_ndbcluster*, NdbConnection*);
};
bool ndbcluster_init(void);