diff options
Diffstat (limited to 'storage/federated/ha_federated.cc')
-rw-r--r-- | storage/federated/ha_federated.cc | 18 |
1 files changed, 18 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) |