Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4e993175
Commit
4e993175
authored
Aug 29, 2005
by
brian@zim.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for delete_all_rows() for archive. This fixes bug #12836.
parent
5b35789d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3654 additions
and
1 deletion
+3654
-1
mysql-test/r/archive.result
mysql-test/r/archive.result
+3626
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+14
-1
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+11
-0
sql/examples/ha_archive.h
sql/examples/ha_archive.h
+1
-0
sql/handler.h
sql/handler.h
+2
-0
No files found.
mysql-test/r/archive.result
View file @
4e993175
This source diff could not be displayed because it is too large. You can
view the blob
instead.
mysql-test/t/archive.test
View file @
4e993175
...
@@ -1310,6 +1310,19 @@ rename table t3 to t4;
...
@@ -1310,6 +1310,19 @@ rename table t3 to t4;
select
*
from
t4
where
fld3
=
'bonfire'
;
select
*
from
t4
where
fld3
=
'bonfire'
;
select
count
(
*
)
from
t4
;
select
count
(
*
)
from
t4
;
drop
table
t1
,
t2
,
t4
;
# End of 4.1 tests
# End of 4.1 tests
#
# For bug #12836
# Delete was allowing all rows to be removed
DELETE
FROM
t2
;
SELECT
*
FROM
t2
;
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
(
4
,
011403
,
37
,
'intercepted'
,
'audiology'
,
'tinily'
,
''
);
SELECT
*
FROM
t2
;
TRUNCATE
TABLE
t2
;
SELECT
*
FROM
t2
;
drop
table
t1
,
t2
,
t4
;
sql/examples/ha_archive.cc
View file @
4e993175
...
@@ -1001,4 +1001,15 @@ ha_rows ha_archive::records_in_range(uint inx, key_range *min_key,
...
@@ -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_ENTER
(
"ha_archive::records_in_range "
);
DBUG_RETURN
(
records
);
// HA_ERR_WRONG_COMMAND
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 */
#endif
/* HAVE_ARCHIVE_DB */
sql/examples/ha_archive.h
View file @
4e993175
...
@@ -95,6 +95,7 @@ public:
...
@@ -95,6 +95,7 @@ public:
int
write_row
(
byte
*
buf
);
int
write_row
(
byte
*
buf
);
int
update_row
(
const
byte
*
old_data
,
byte
*
new_data
);
int
update_row
(
const
byte
*
old_data
,
byte
*
new_data
);
int
delete_row
(
const
byte
*
buf
);
int
delete_row
(
const
byte
*
buf
);
int
delete_all_rows
();
int
index_read
(
byte
*
buf
,
const
byte
*
key
,
int
index_read
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
);
uint
key_len
,
enum
ha_rkey_function
find_flag
);
int
index_read_idx
(
byte
*
buf
,
uint
idx
,
const
byte
*
key
,
int
index_read_idx
(
byte
*
buf
,
uint
idx
,
const
byte
*
key
,
...
...
sql/handler.h
View file @
4e993175
...
@@ -531,6 +531,8 @@ extern TYPELIB tx_isolation_typelib;
...
@@ -531,6 +531,8 @@ extern TYPELIB tx_isolation_typelib;
#define ha_supports_generate(T) (T != DB_TYPE_INNODB && \
#define ha_supports_generate(T) (T != DB_TYPE_INNODB && \
T != DB_TYPE_BERKELEY_DB && \
T != DB_TYPE_BERKELEY_DB && \
T != DB_TYPE_ARCHIVE_DB && \
T != DB_TYPE_FEDERATED_DB && \
T != DB_TYPE_NDBCLUSTER)
T != DB_TYPE_NDBCLUSTER)
bool
ha_caching_allowed
(
THD
*
thd
,
char
*
table_key
,
bool
ha_caching_allowed
(
THD
*
thd
,
char
*
table_key
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment