diff options
author | unknown <patg@krsna.patg.net> | 2005-02-22 11:02:21 -0800 |
---|---|---|
committer | unknown <patg@krsna.patg.net> | 2005-02-22 11:02:21 -0800 |
commit | 65492347e86bfddd54627c0f6dda483e075a5ec6 (patch) | |
tree | 699baec2ab946b116e6e62d48d04bbb2262054bd /sql/ha_federated.h | |
parent | bf46e486bb35c2edb0284b49c64cfe1609016a6b (diff) | |
parent | 39e14ac165180e61ad55788bad3ca6f525acdd0f (diff) | |
download | mariadb-git-65492347e86bfddd54627c0f6dda483e075a5ec6.tar.gz |
Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into krsna.patg.net:/home/patg/mysql-5.0
sql/handler.cc:
Auto merged
Diffstat (limited to 'sql/ha_federated.h')
-rwxr-xr-x | sql/ha_federated.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/sql/ha_federated.h b/sql/ha_federated.h index 75f2c227d45..f685aa9e3f9 100755 --- a/sql/ha_federated.h +++ b/sql/ha_federated.h @@ -32,13 +32,16 @@ FEDERATED_SHARE is a structure that will be shared amoung all open handlers The example implements the minimum of what you will probably need. */ -//FIX document typedef struct st_federated_share { char *table_name; char *table_base_name; - // the primary select query to be used in rnd_init + /* + the primary select query to be used in rnd_init + */ char *select_query; - // remote host info, parse_url supplies + /* + remote host info, parse_url supplies + */ char *scheme; char *hostname; char *username; @@ -62,6 +65,7 @@ class ha_federated: public handler FEDERATED_SHARE *share; /* Shared lock info */ MYSQL *mysql; MYSQL_RES *result; + bool scan_flag; uint ref_length; uint fetch_num; // stores the fetch num MYSQL_ROW_OFFSET current_position; // Current position used by ::position() @@ -73,10 +77,12 @@ private: */ uint convert_row_to_internal_format(byte *buf, MYSQL_ROW row); bool create_where_from_key(String *to, KEY *key_info, const byte *key, uint key_length); + bool create_where_from_key(String *to, KEY *key_info, + const byte *key, uint key_length); public: ha_federated(TABLE *table): handler(table), - mysql(0), + mysql(0), result(0), scan_flag(0), ref_length(sizeof(MYSQL_ROW_OFFSET)), current_position(0) { } @@ -126,11 +132,16 @@ public: /* Called in test_quick_select to determine if indexes should be used. */ - virtual double scan_time() { DBUG_PRINT("ha_federated::scan_time", ("rows %d", records)); return (double)(records*2); } + virtual double scan_time() + { + DBUG_PRINT("ha_federated::scan_time", + ("rows %d", records)); return (double)(records*2); + } /* The next method will never be called if you do not implement indexes. */ - virtual double read_time(uint index, uint ranges, ha_rows rows) { return (double) rows / 20.0+1; } + virtual double read_time(uint index, uint ranges, ha_rows rows) + { return (double) rows / 20.0+1; } /* Everything below are methods that we implment in ha_federated.cc. @@ -173,3 +184,6 @@ public: THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); //required }; + +bool federated_db_init(void); +bool federated_db_end(void); |