summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2005-08-30 08:28:34 -0700
committerunknown <brian@zim.(none)>2005-08-30 08:28:34 -0700
commitcf57c3cfb9d5aa5793ca78d32da6f4cb40e0d79b (patch)
treeb4b14d357abd8b80aada5a57fe412bccdfbe6eba /sql
parent26b9da7ee346869142004758b53d21ae2c7ca02d (diff)
parent406b41152fe30fcb6671000ec61f2df1bb857b51 (diff)
downloadmariadb-git-cf57c3cfb9d5aa5793ca78d32da6f4cb40e0d79b.tar.gz
Merge baker@bk-internal.mysql.com:/home/bk/mysql-4.1
into zim.(none):/home/brian/mysql/mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r--sql/examples/ha_archive.cc11
-rw-r--r--sql/examples/ha_archive.h1
-rw-r--r--sql/handler.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index b125f435cfa..b754c429dda 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -1001,4 +1001,15 @@ ha_rows ha_archive::records_in_range(uint inx, key_range *min_key,
DBUG_ENTER("ha_archive::records_in_range ");
DBUG_RETURN(records); // HA_ERR_WRONG_COMMAND
}
+
+/*
+ We cancel a truncate command. The only way to delete an archive table is to drop it.
+ This is done for security reasons. In a later version we will enable this by
+ allowing the user to select a different row format.
+*/
+int ha_archive::delete_all_rows()
+{
+ DBUG_ENTER("ha_archive::delete_all_rows");
+ DBUG_RETURN(0);
+}
#endif /* HAVE_ARCHIVE_DB */
diff --git a/sql/examples/ha_archive.h b/sql/examples/ha_archive.h
index 52300fda8a2..6ceb660e951 100644
--- a/sql/examples/ha_archive.h
+++ b/sql/examples/ha_archive.h
@@ -95,6 +95,7 @@ public:
int write_row(byte * buf);
int update_row(const byte * old_data, byte * new_data);
int delete_row(const byte * buf);
+ int delete_all_rows();
int index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_idx(byte * buf, uint idx, const byte * key,
diff --git a/sql/handler.h b/sql/handler.h
index efcdee8f56c..b69eec3edd5 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -531,6 +531,8 @@ extern TYPELIB tx_isolation_typelib;
#define ha_supports_generate(T) (T != DB_TYPE_INNODB && \
T != DB_TYPE_BERKELEY_DB && \
+ T != DB_TYPE_ARCHIVE_DB && \
+ T != DB_TYPE_FEDERATED_DB && \
T != DB_TYPE_NDBCLUSTER)
bool ha_caching_allowed(THD* thd, char* table_key,