summaryrefslogtreecommitdiff
path: root/storage/federated
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-12-01 00:46:44 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2007-12-01 00:46:44 +0400
commit51f5ac6b29a7823836695d0f2dcfd4e3ef89bdb2 (patch)
treefc471579f6612b624f72147feb84761b29806c2b /storage/federated
parent65b77b9df6c0cb53a7b77e83d9e3a74d5c07972f (diff)
parent4100e3e4c2408cb1f28823842db8d8d448aebe4b (diff)
downloadmariadb-git-51f5ac6b29a7823836695d0f2dcfd4e3ef89bdb2.tar.gz
Merge mysql.com:/home/hf/work/mrg/my50-mrg
into mysql.com:/home/hf/work/mrg/my51-mrg sql/mysqld.cc: Auto merged sql/protocol.cc: Auto merged storage/federated/ha_federated.cc: Auto merged tests/mysql_client_test.c: Auto merged include/mysql_com.h: merging libmysqld/lib_sql.cc: merging mysql-test/r/federated.result: merging mysql-test/t/federated.test: merging storage/federated/ha_federated.h: mergin
Diffstat (limited to 'storage/federated')
-rw-r--r--storage/federated/ha_federated.cc18
-rw-r--r--storage/federated/ha_federated.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 8673847fcac..091a26f6f36 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -2408,6 +2408,24 @@ error:
}
+/*
+ This method is used exlusevely by filesort() to check if we
+ can create sorting buffers of necessary size.
+ If the handler returns more records that it declares
+ here server can just crash on filesort().
+ We cannot guarantee that's not going to happen with
+ the FEDERATED engine, as we have records==0 always if the
+ client is a VIEW, and for the table the number of
+ records can inpredictably change during execution.
+ So we return maximum possible value here.
+*/
+
+ha_rows ha_federated::estimate_rows_upper_bound()
+{
+ return HA_POS_ERROR;
+}
+
+
/* Initialized at each key walk (called multiple times unlike rnd_init()) */
int ha_federated::index_init(uint keynr, bool sorted)
diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h
index 40bcf9cc402..1974f9936fc 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -210,6 +210,7 @@ public:
int update_row(const uchar *old_data, uchar *new_data);
int delete_row(const uchar *buf);
int index_init(uint keynr, bool sorted);
+ ha_rows estimate_rows_upper_bound();
int index_read(uchar *buf, const uchar *key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_idx(uchar *buf, uint idx, const uchar *key,