diff options
author | ndbdev@dl145b.mysql.com <> | 2005-08-31 20:45:48 +0200 |
---|---|---|
committer | ndbdev@dl145b.mysql.com <> | 2005-08-31 20:45:48 +0200 |
commit | 583979d949bd5bd011b16d415631d41e7ceee529 (patch) | |
tree | df48637e985f4d72268ca92076f8628b73b8f077 /sql/examples | |
parent | 6bf4e15b0836363ea63f156525e0653a4da6534b (diff) | |
parent | 41fc00641cf0bcab8bf52059c4e482c964f261fc (diff) | |
download | mariadb-git-583979d949bd5bd011b16d415631d41e7ceee529.tar.gz |
merge
Diffstat (limited to 'sql/examples')
-rw-r--r-- | sql/examples/ha_archive.cc | 11 | ||||
-rw-r--r-- | sql/examples/ha_archive.h | 1 | ||||
-rw-r--r-- | sql/examples/ha_tina.cc | 2 |
3 files changed, 14 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..e2d8aa49add 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_all_rows(); int rnd_init(bool scan=1); int rnd_next(byte *buf); int rnd_pos(byte * buf, byte *pos); diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc index 8a31d9c0b22..c5cefeae125 100644 --- a/sql/examples/ha_tina.cc +++ b/sql/examples/ha_tina.cc @@ -651,7 +651,9 @@ int ha_tina::rnd_init(bool scan) current_position= next_position= 0; records= 0; chain_ptr= chain; +#ifdef MADV_SEQUENTIAL (void)madvise(share->mapped_file,share->file_stat.st_size,MADV_SEQUENTIAL); +#endif DBUG_RETURN(0); } |