summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorunknown <stewart@willster.(none)>2006-08-10 22:55:20 +0800
committerunknown <stewart@willster.(none)>2006-08-10 22:55:20 +0800
commite34496e5d827c774a92891fb8201a53a27564e38 (patch)
treeeca32a4dab10c05bdc27fdb082459d63c173bbe4 /sql/examples
parentbfdbb780c26aae2705cf0d7e3048b5c0e40f59e1 (diff)
downloadmariadb-git-e34496e5d827c774a92891fb8201a53a27564e38.tar.gz
BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
allow handler::info to return an error code (that will be returned to the user) sql/ha_berkeley.cc: update handler::info interface to return int sql/ha_berkeley.h: update handler::info interface to return int sql/ha_heap.cc: update handler::info interface to return int sql/ha_heap.h: update handler::info interface to return int sql/ha_innodb.cc: update handler::info interface to return int sql/ha_innodb.h: update handler::info interface to return int sql/ha_myisam.cc: update handler::info interface to return int sql/examples/ha_archive.cc: update handler::info interface to return int sql/examples/ha_archive.h: update handler::info interface to return int sql/examples/ha_example.cc: update handler::info interface to return int sql/examples/ha_example.h: update handler::info interface to return int sql/examples/ha_tina.cc: update handler::info interface to return int sql/examples/ha_tina.h: update handler::info interface to return int sql/ha_myisam.h: update handler::info interface to return int sql/ha_myisammrg.cc: update handler::info interface to return int sql/ha_myisammrg.h: update handler::info interface to return int sql/ha_ndbcluster.cc: update handler::info interface to return int sql/ha_ndbcluster.h: update handler::info interface to return int sql/handler.h: update handler::info interface to return int sql/opt_sum.cc: If we get an error when using handler::info to get count(*), print and return the error. sql/sql_select.cc: if error, set fatal error.
Diffstat (limited to 'sql/examples')
-rw-r--r--sql/examples/ha_archive.cc4
-rw-r--r--sql/examples/ha_archive.h2
-rw-r--r--sql/examples/ha_example.cc4
-rw-r--r--sql/examples/ha_example.h2
-rw-r--r--sql/examples/ha_tina.cc4
-rw-r--r--sql/examples/ha_tina.h2
6 files changed, 9 insertions, 9 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index 55fc359348f..16ba7605415 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -972,7 +972,7 @@ int ha_archive::index_last(byte * buf)
}
-void ha_archive::info(uint flag)
+int ha_archive::info(uint flag)
{
DBUG_ENTER("ha_archive::info");
@@ -980,7 +980,7 @@ void ha_archive::info(uint flag)
records= share->rows_recorded;
deleted= 0;
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
int ha_archive::extra(enum ha_extra_function operation)
diff --git a/sql/examples/ha_archive.h b/sql/examples/ha_archive.h
index 6ceb660e951..3c5dccfdb6f 100644
--- a/sql/examples/ha_archive.h
+++ b/sql/examples/ha_archive.h
@@ -116,7 +116,7 @@ public:
int read_data_header(gzFile file_to_read);
int write_data_header(gzFile file_to_write);
void position(const byte *record);
- void info(uint);
+ int info(uint);
int extra(enum ha_extra_function operation);
int reset(void);
int external_lock(THD *thd, int lock_type);
diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc
index b3edce5ba4a..924ced816aa 100644
--- a/sql/examples/ha_example.cc
+++ b/sql/examples/ha_example.cc
@@ -486,10 +486,10 @@ int ha_example::rnd_pos(byte * buf, byte *pos)
sql_update.cc
*/
-void ha_example::info(uint flag)
+int ha_example::info(uint flag)
{
DBUG_ENTER("ha_example::info");
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
diff --git a/sql/examples/ha_example.h b/sql/examples/ha_example.h
index ae72e5bb275..cb8a8465737 100644
--- a/sql/examples/ha_example.h
+++ b/sql/examples/ha_example.h
@@ -138,7 +138,7 @@ public:
int rnd_next(byte *buf); //required
int rnd_pos(byte * buf, byte *pos); //required
void position(const byte *record); //required
- void info(uint); //required
+ int info(uint); //required
int extra(enum ha_extra_function operation);
int reset(void);
diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc
index 91e42bfea31..0091e1f40a0 100644
--- a/sql/examples/ha_tina.cc
+++ b/sql/examples/ha_tina.cc
@@ -683,13 +683,13 @@ int ha_tina::rnd_pos(byte * buf, byte *pos)
Currently this table handler doesn't implement most of the fields
really needed. SHOW also makes use of this data
*/
-void ha_tina::info(uint flag)
+int ha_tina::info(uint flag)
{
DBUG_ENTER("ha_tina::info");
/* This is a lie, but you don't want the optimizer to see zero or 1 */
if (records < 2)
records= 2;
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
/*
diff --git a/sql/examples/ha_tina.h b/sql/examples/ha_tina.h
index 22193c01013..d8cd0fa9cfe 100644
--- a/sql/examples/ha_tina.h
+++ b/sql/examples/ha_tina.h
@@ -115,7 +115,7 @@ class ha_tina: public handler
int rnd_pos(byte * buf, byte *pos);
int rnd_end();
void position(const byte *record);
- void info(uint);
+ int info(uint);
int extra(enum ha_extra_function operation);
int reset(void);
int external_lock(THD *thd, int lock_type);