diff options
author | unknown <patg@krsna.patg.net> | 2005-02-20 14:20:05 -0800 |
---|---|---|
committer | unknown <patg@krsna.patg.net> | 2005-02-20 14:20:05 -0800 |
commit | 39e14ac165180e61ad55788bad3ca6f525acdd0f (patch) | |
tree | c6f9b6e2f319c9bcb72b706c0548c6c40ce30357 /sql/ha_federated.h | |
parent | b3b5f8fb651e40506ab51acb12796b0f7d8d98ef (diff) | |
parent | 488de6cc3fbf7f69f655c2c7135517fe78f63c85 (diff) | |
download | mariadb-git-39e14ac165180e61ad55788bad3ca6f525acdd0f.tar.gz |
Merge
sql/ha_federated.cc:
Auto merged
sql/handler.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/ha_federated.h:
SCCS 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); |