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
427ce41c
Commit
427ce41c
authored
Dec 14, 2003
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in last push found by valgrind
parent
d47deebb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
myisam/mi_dbug.c
myisam/mi_dbug.c
+4
-0
sql/opt_range.cc
sql/opt_range.cc
+7
-8
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
myisam/mi_dbug.c
View file @
427ce41c
...
...
@@ -137,6 +137,10 @@ void _mi_print_key(FILE *stream, register MI_KEYSEG *keyseg,
{
uint
tmp_length
;
get_key_length
(
tmp_length
,
key
);
/*
The following command sometimes gives a warning from valgrind.
Not yet sure if the bug is in valgrind, glibc or mysqld
*/
VOID
(
fprintf
(
stream
,
"%.*s"
,(
int
)
tmp_length
,
key
));
key
+=
tmp_length
;
break
;
...
...
sql/opt_range.cc
View file @
427ce41c
...
...
@@ -1062,7 +1062,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
if
(
field
->
key_type
()
==
HA_KEYTYPE_VARTEXT
)
copies
=
2
;
str
=
str2
=
(
char
*
)
alloc_root
(
param
->
mem_root
,
(
key_part
->
part_length
+
maybe_null
)
*
copies
);
(
key_part
->
part_length
+
maybe_null
)
*
copies
+
1
);
if
(
!
str
)
DBUG_RETURN
(
0
);
if
(
maybe_null
)
...
...
@@ -1078,16 +1078,15 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
uint
length
=
uint2korr
(
str
+
maybe_null
);
char
*
end
;
str2
=
str
+
key_part
->
part_length
+
maybe_null
;
/* remove end space
. The 2 is for the packed length
*/
while
(
length
>
0
&&
str
[
length
+
2
+
maybe_null
-
1
]
==
' '
)
/* remove end space */
while
(
length
>
0
&&
str
[
length
+
HA_KEY_BLOB_LENGTH
+
maybe_null
-
1
]
==
' '
)
length
--
;
int2store
(
str
+
maybe_null
,
length
);
/* Create key that is space filled */
memcpy
(
str2
,
str
,
length
+
2
+
maybe_null
);
end
=
str2
+
maybe_null
+
key_part
->
part_length
;
for
(
char
*
pos
=
str2
+
2
+
length
+
maybe_null
;
pos
<
end
;
pos
++
)
*
pos
++=
' '
;
int2store
(
str2
+
maybe_null
,
key_part
->
part_length
);
memcpy
(
str2
,
str
,
length
+
HA_KEY_BLOB_LENGTH
+
maybe_null
);
bfill
(
str2
+
length
+
HA_KEY_BLOB_LENGTH
+
maybe_null
,
key_part
->
part_length
-
length
-
HA_KEY_BLOB_LENGTH
,
' '
);
int2store
(
str2
+
maybe_null
,
key_part
->
part_length
-
HA_KEY_BLOB_LENGTH
);
}
if
(
!
(
tree
=
new
SEL_ARG
(
field
,
str
,
str2
)))
DBUG_RETURN
(
0
);
// out of memory
...
...
sql/sql_update.cc
View file @
427ce41c
...
...
@@ -440,7 +440,7 @@ multi_update::multi_update(THD *thd_arg, TABLE_LIST *table_list,
:
all_tables
(
table_list
),
update_tables
(
0
),
thd
(
thd_arg
),
tmp_tables
(
0
),
updated
(
0
),
found
(
0
),
fields
(
field_list
),
values
(
value_list
),
table_count
(
0
),
copy_field
(
0
),
handle_duplicates
(
handle_duplicates_arg
),
do_update
(
1
),
trans_safe
(
0
)
do_update
(
1
),
trans_safe
(
0
)
,
transactional_tables
(
1
)
{}
...
...
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