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
a7862496
Commit
a7862496
authored
Jan 12, 2007
by
kostja@bodhi.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into bodhi.local:/opt/local/work/mysql-4.1-runtime
parents
4ffada35
dd03d51f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
heap/hp_block.c
heap/hp_block.c
+1
-1
heap/hp_write.c
heap/hp_write.c
+9
-3
sql/item_func.cc
sql/item_func.cc
+3
-2
No files found.
heap/hp_block.c
View file @
a7862496
...
@@ -76,7 +76,7 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
...
@@ -76,7 +76,7 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
and my_default_record_cache_size we get about 1/128 unused memory.
and my_default_record_cache_size we get about 1/128 unused memory.
*/
*/
*
alloc_length
=
sizeof
(
HP_PTRS
)
*
i
+
block
->
records_in_block
*
block
->
recbuffer
;
*
alloc_length
=
sizeof
(
HP_PTRS
)
*
i
+
block
->
records_in_block
*
block
->
recbuffer
;
if
(
!
(
root
=
(
HP_PTRS
*
)
my_malloc
(
*
alloc_length
,
MYF
(
0
))))
if
(
!
(
root
=
(
HP_PTRS
*
)
my_malloc
(
*
alloc_length
,
MYF
(
MY_WME
))))
return
1
;
return
1
;
if
(
i
==
0
)
if
(
i
==
0
)
...
...
heap/hp_write.c
View file @
a7862496
...
@@ -68,11 +68,17 @@ int heap_write(HP_INFO *info, const byte *record)
...
@@ -68,11 +68,17 @@ int heap_write(HP_INFO *info, const byte *record)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
err:
err:
DBUG_PRINT
(
"info"
,(
"Duplicate key: %d"
,
keydef
-
share
->
keydef
));
if
(
my_errno
==
HA_ERR_FOUND_DUPP_KEY
)
DBUG_PRINT
(
"info"
,(
"Duplicate key: %d"
,
keydef
-
share
->
keydef
));
info
->
errkey
=
keydef
-
share
->
keydef
;
info
->
errkey
=
keydef
-
share
->
keydef
;
if
(
keydef
->
algorithm
==
HA_KEY_ALG_BTREE
)
/*
We don't need to delete non-inserted key from rb-tree. Also, if
we got ENOMEM, the key wasn't inserted, so don't try to delete it
either. Otherwise for HASH index on HA_ERR_FOUND_DUPP_KEY the key
was inserted and we have to delete it.
*/
if
(
keydef
->
algorithm
==
HA_KEY_ALG_BTREE
||
my_errno
==
ENOMEM
)
{
{
/* we don't need to delete non-inserted key from rb-tree */
keydef
--
;
keydef
--
;
}
}
while
(
keydef
>=
share
->
keydef
)
while
(
keydef
>=
share
->
keydef
)
...
...
sql/item_func.cc
View file @
a7862496
...
@@ -2473,8 +2473,9 @@ bool Item_func_set_user_var::update_hash(void *ptr, uint length,
...
@@ -2473,8 +2473,9 @@ bool Item_func_set_user_var::update_hash(void *ptr, uint length,
char
*
pos
=
(
char
*
)
entry
+
ALIGN_SIZE
(
sizeof
(
user_var_entry
));
char
*
pos
=
(
char
*
)
entry
+
ALIGN_SIZE
(
sizeof
(
user_var_entry
));
if
(
entry
->
value
==
pos
)
if
(
entry
->
value
==
pos
)
entry
->
value
=
0
;
entry
->
value
=
0
;
if
(
!
(
entry
->
value
=
(
char
*
)
my_realloc
(
entry
->
value
,
length
,
entry
->
value
=
(
char
*
)
my_realloc
(
entry
->
value
,
length
,
MYF
(
MY_ALLOW_ZERO_PTR
))))
MYF
(
MY_ALLOW_ZERO_PTR
|
MY_WME
));
if
(
!
entry
->
value
)
goto
err
;
goto
err
;
}
}
}
}
...
...
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