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
85063c08
Commit
85063c08
authored
Mar 28, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into mysql.com:/home/ram/work/mysql-5.1-bugteam
parents
8c5eebfc
0795e14c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
mysql-test/r/temp_table.result
mysql-test/r/temp_table.result
+11
-0
mysql-test/t/temp_table.test
mysql-test/t/temp_table.test
+14
-0
storage/myisam/mi_delete_all.c
storage/myisam/mi_delete_all.c
+7
-4
No files found.
mysql-test/r/temp_table.result
View file @
85063c08
...
...
@@ -184,3 +184,14 @@ select * from t1;
a
42
drop table t1;
CREATE TEMPORARY TABLE t1(a INT, b VARCHAR(20));
INSERT INTO t1 VALUES(1, 'val1'), (2, 'val2'), (3, 'val3');
DELETE FROM t1 WHERE a=1;
SELECT count(*) FROM t1;
count(*)
2
DELETE FROM t1;
SELECT * FROM t1;
a b
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/temp_table.test
View file @
85063c08
...
...
@@ -191,3 +191,17 @@ truncate t1;
insert
into
t1
values
(
42
);
select
*
from
t1
;
drop
table
t1
;
#
# Bug #35392: Delete all statement does not execute properly after
# few delete statements
#
CREATE
TEMPORARY
TABLE
t1
(
a
INT
,
b
VARCHAR
(
20
));
INSERT
INTO
t1
VALUES
(
1
,
'val1'
),
(
2
,
'val2'
),
(
3
,
'val3'
);
DELETE
FROM
t1
WHERE
a
=
1
;
SELECT
count
(
*
)
FROM
t1
;
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
storage/myisam/mi_delete_all.c
View file @
85063c08
...
...
@@ -53,15 +53,18 @@ int mi_delete_all_rows(MI_INFO *info)
since it was locked then there may be key blocks in the key cache
*/
flush_key_blocks
(
share
->
key_cache
,
share
->
kfile
,
FLUSH_IGNORE_CHANGED
);
#ifdef HAVE_MMAP
if
(
share
->
file_map
)
_mi_unmap_file
(
info
);
#endif
if
(
my_chsize
(
info
->
dfile
,
0
,
0
,
MYF
(
MY_WME
))
||
my_chsize
(
share
->
kfile
,
share
->
base
.
keystart
,
0
,
MYF
(
MY_WME
))
)
goto
err
;
VOID
(
_mi_writeinfo
(
info
,
WRITEINFO_UPDATE_KEYFILE
));
#ifdef HAVE_MMAP
/* Resize mmaped area */
rw_wrlock
(
&
info
->
s
->
mmap_lock
);
mi_remap_file
(
info
,
(
my_off_t
)
0
);
rw_unlock
(
&
info
->
s
->
mmap_lock
);
/* Map again */
if
(
share
->
file_map
)
mi_dynmap_file
(
info
,
(
my_off_t
)
0
);
#endif
allow_break
();
/* Allow SIGHUP & SIGINT */
DBUG_RETURN
(
0
);
...
...
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