Commit c583de95 authored by ramil@mysql.com's avatar ramil@mysql.com

Fix for bug #15558: truncate doesn't clear table on archive storage engine tables.

parent 28cf1060
...@@ -2616,6 +2616,7 @@ select count(*) from t4; ...@@ -2616,6 +2616,7 @@ select count(*) from t4;
count(*) count(*)
1203 1203
DELETE FROM t2; DELETE FROM t2;
ERROR HY000: Table storage engine for 't2' doesn't have this option
SELECT * FROM t2; SELECT * FROM t2;
auto fld1 companynr fld3 fld4 fld5 fld6 auto fld1 companynr fld3 fld4 fld5 fld6
1 000001 00 Omaha teethe neat 1 000001 00 Omaha teethe neat
...@@ -5033,6 +5034,7 @@ auto fld1 companynr fld3 fld4 fld5 fld6 ...@@ -5033,6 +5034,7 @@ auto fld1 companynr fld3 fld4 fld5 fld6
3 011402 37 Romans scholastics jarring 3 011402 37 Romans scholastics jarring
4 011403 37 intercepted audiology tinily 4 011403 37 intercepted audiology tinily
TRUNCATE TABLE t2; TRUNCATE TABLE t2;
ERROR HY000: Table storage engine for 't2' doesn't have this option
SELECT * FROM t2; SELECT * FROM t2;
auto fld1 companynr fld3 fld4 fld5 fld6 auto fld1 companynr fld3 fld4 fld5 fld6
1 000001 00 Omaha teethe neat 1 000001 00 Omaha teethe neat
......
...@@ -1316,12 +1316,14 @@ select count(*) from t4; ...@@ -1316,12 +1316,14 @@ select count(*) from t4;
# #
# For bug #12836 # For bug #12836
# Delete was allowing all rows to be removed # Delete was allowing all rows to be removed
--error 1031
DELETE FROM t2; DELETE FROM t2;
SELECT * FROM t2; SELECT * FROM t2;
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W'); INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring',''); INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
SELECT * FROM t2; SELECT * FROM t2;
--error 1031
TRUNCATE TABLE t2; TRUNCATE TABLE t2;
SELECT * FROM t2; SELECT * FROM t2;
......
...@@ -1010,6 +1010,6 @@ ha_rows ha_archive::records_in_range(uint inx, key_range *min_key, ...@@ -1010,6 +1010,6 @@ ha_rows ha_archive::records_in_range(uint inx, key_range *min_key,
int ha_archive::delete_all_rows() int ha_archive::delete_all_rows()
{ {
DBUG_ENTER("ha_archive::delete_all_rows"); DBUG_ENTER("ha_archive::delete_all_rows");
DBUG_RETURN(0); DBUG_RETURN(HA_ERR_WRONG_COMMAND);
} }
#endif /* HAVE_ARCHIVE_DB */ #endif /* HAVE_ARCHIVE_DB */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment