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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3b111a9b
Commit
3b111a9b
authored
Dec 02, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (bug #6878: Crash with engine=memory).
parent
980bd4a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
heap/hp_create.c
heap/hp_create.c
+7
-0
mysql-test/r/heap.result
mysql-test/r/heap.result
+9
-0
mysql-test/t/heap.test
mysql-test/t/heap.test
+10
-0
No files found.
heap/hp_create.c
View file @
3b111a9b
...
...
@@ -41,6 +41,13 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
{
HP_KEYDEF
*
keyinfo
;
DBUG_PRINT
(
"info"
,(
"Initializing new table"
));
/*
We have to store sometimes byte* del_link in records,
so the record length should be at least sizeof(byte*)
*/
set_if_bigger
(
reclength
,
sizeof
(
byte
*
));
for
(
i
=
key_segs
=
max_length
=
0
,
keyinfo
=
keydef
;
i
<
keys
;
i
++
,
keyinfo
++
)
{
bzero
((
char
*
)
&
keyinfo
->
block
,
sizeof
(
keyinfo
->
block
));
...
...
mysql-test/r/heap.result
View file @
3b111a9b
...
...
@@ -240,3 +240,12 @@ SELECT * FROM t1;
pseudo date
ZoomZip 1101106546
DROP TABLE t1;
create table t1(a char(2)) engine=memory;
insert into t1 values (NULL), (NULL);
delete from t1 where a is null;
insert into t1 values ('2'), ('3');
select * from t1;
a
3
2
drop table t1;
mysql-test/t/heap.test
View file @
3b111a9b
...
...
@@ -185,3 +185,13 @@ DELETE FROM t1 WHERE date<1101106546;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Bug #6878: a problem with small length records
#
create
table
t1
(
a
char
(
2
))
engine
=
memory
;
insert
into
t1
values
(
NULL
),
(
NULL
);
delete
from
t1
where
a
is
null
;
insert
into
t1
values
(
'2'
),
(
'3'
);
select
*
from
t1
;
drop
table
t1
;
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