summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2005-08-29 15:26:05 -0700
committerunknown <brian@zim.(none)>2005-08-29 15:26:05 -0700
commit31203972909a4219b32416da86343f9ef27a5ab8 (patch)
treeff03703449d0a68dde293806d582c80e959bea0f /sql/examples
parent11d32b4af305ba98f19d24adc65a04816bfb2861 (diff)
parent341a08edd34dd4b8bb975af21d6531c1ef62f92d (diff)
downloadmariadb-git-31203972909a4219b32416da86343f9ef27a5ab8.tar.gz
Update for delete_all_rows() which will be used for TRUNCATE and DELETE support.
mysql-test/t/archive.test: Auto merged sql/handler.h: Auto merged mysql-test/r/archive.result: Result sets sql/examples/ha_archive.cc: Update for tests sql/examples/ha_archive.h: Updated from merge, added new method for solving truncate problems.
Diffstat (limited to 'sql/examples')
-rw-r--r--sql/examples/ha_archive.cc11
-rw-r--r--sql/examples/ha_archive.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index fd47b45ce52..d5cf713aa44 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -1028,4 +1028,15 @@ int ha_archive::end_bulk_insert()
share->dirty= TRUE;
DBUG_RETURN(0);
}
+
+/*
+ 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 41835c5fb6f..7e8b9683aa8 100644
--- a/sql/examples/ha_archive.h
+++ b/sql/examples/ha_archive.h
@@ -78,6 +78,7 @@ public:
int close(void);
int write_row(byte * buf);
int real_write_row(byte *buf, gzFile writer);
+ int delete_row(const byte * buf);
int rnd_init(bool scan=1);
int rnd_next(byte *buf);
int rnd_pos(byte * buf, byte *pos);