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
d6ca0cbb
Commit
d6ca0cbb
authored
Sep 17, 2009
by
Staale Smedseng
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.0
parents
2535ede7
e5888b16
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
47 deletions
+18
-47
include/my_global.h
include/my_global.h
+0
-6
mysys/hash.c
mysys/hash.c
+2
-7
sql-common/my_time.c
sql-common/my_time.c
+1
-2
sql/item_func.cc
sql/item_func.cc
+2
-4
sql/item_timefunc.cc
sql/item_timefunc.cc
+3
-8
sql/sql_handler.cc
sql/sql_handler.cc
+2
-5
sql/udf_example.c
sql/udf_example.c
+2
-2
storage/heap/hp_write.c
storage/heap/hp_write.c
+2
-5
storage/myisam/mi_search.c
storage/myisam/mi_search.c
+2
-4
storage/myisam/mi_write.c
storage/myisam/mi_write.c
+2
-4
No files found.
include/my_global.h
View file @
d6ca0cbb
...
@@ -558,12 +558,6 @@ int __void__;
...
@@ -558,12 +558,6 @@ int __void__;
#define LINT_INIT(var)
#define LINT_INIT(var)
#endif
#endif
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify)
#define PURIFY_OR_LINT_INIT(var) var=0
#else
#define PURIFY_OR_LINT_INIT(var)
#endif
/*
/*
Suppress uninitialized variable warning without generating code.
Suppress uninitialized variable warning without generating code.
...
...
mysys/hash.c
View file @
d6ca0cbb
...
@@ -332,13 +332,8 @@ my_bool my_hash_insert(HASH *info, const uchar *record)
...
@@ -332,13 +332,8 @@ my_bool my_hash_insert(HASH *info, const uchar *record)
{
{
int
flag
;
int
flag
;
size_t
idx
,
halfbuff
,
hash_nr
,
first_index
;
size_t
idx
,
halfbuff
,
hash_nr
,
first_index
;
uchar
*
ptr_to_rec
,
*
ptr_to_rec2
;
uchar
*
UNINIT_VAR
(
ptr_to_rec
),
*
UNINIT_VAR
(
ptr_to_rec2
);
HASH_LINK
*
data
,
*
empty
,
*
gpos
,
*
gpos2
,
*
pos
;
HASH_LINK
*
data
,
*
empty
,
*
UNINIT_VAR
(
gpos
),
*
UNINIT_VAR
(
gpos2
),
*
pos
;
LINT_INIT
(
gpos
);
LINT_INIT
(
gpos2
);
LINT_INIT
(
ptr_to_rec
);
LINT_INIT
(
ptr_to_rec2
);
if
(
HASH_UNIQUE
&
info
->
flags
)
if
(
HASH_UNIQUE
&
info
->
flags
)
{
{
...
...
sql-common/my_time.c
View file @
d6ca0cbb
...
@@ -165,7 +165,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
...
@@ -165,7 +165,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
uint
add_hours
=
0
,
start_loop
;
uint
add_hours
=
0
,
start_loop
;
ulong
not_zero_date
,
allow_space
;
ulong
not_zero_date
,
allow_space
;
my_bool
is_internal_format
;
my_bool
is_internal_format
;
const
char
*
pos
,
*
last_field_pos
;
const
char
*
pos
,
*
UNINIT_VAR
(
last_field_pos
)
;
const
char
*
end
=
str
+
length
;
const
char
*
end
=
str
+
length
;
const
uchar
*
format_position
;
const
uchar
*
format_position
;
my_bool
found_delimitier
=
0
,
found_space
=
0
;
my_bool
found_delimitier
=
0
,
found_space
=
0
;
...
@@ -174,7 +174,6 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
...
@@ -174,7 +174,6 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
DBUG_PRINT
(
"ENTER"
,(
"str: %.*s"
,
length
,
str
));
DBUG_PRINT
(
"ENTER"
,(
"str: %.*s"
,
length
,
str
));
LINT_INIT
(
field_length
);
LINT_INIT
(
field_length
);
LINT_INIT
(
last_field_pos
);
*
was_cut
=
0
;
*
was_cut
=
0
;
...
...
sql/item_func.cc
View file @
d6ca0cbb
...
@@ -435,8 +435,7 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const
...
@@ -435,8 +435,7 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const
Field
*
Item_func
::
tmp_table_field
(
TABLE
*
table
)
Field
*
Item_func
::
tmp_table_field
(
TABLE
*
table
)
{
{
Field
*
field
;
Field
*
field
=
NULL
;
LINT_INIT
(
field
);
switch
(
result_type
())
{
switch
(
result_type
())
{
case
INT_RESULT
:
case
INT_RESULT
:
...
@@ -4236,9 +4235,8 @@ void Item_func_set_user_var::save_item_result(Item *item)
...
@@ -4236,9 +4235,8 @@ void Item_func_set_user_var::save_item_result(Item *item)
bool
bool
Item_func_set_user_var
::
update
()
Item_func_set_user_var
::
update
()
{
{
bool
res
;
bool
res
=
NULL
;
DBUG_ENTER
(
"Item_func_set_user_var::update"
);
DBUG_ENTER
(
"Item_func_set_user_var::update"
);
LINT_INIT
(
res
);
switch
(
cached_result_type
)
{
switch
(
cached_result_type
)
{
case
REAL_RESULT
:
case
REAL_RESULT
:
...
...
sql/item_timefunc.cc
View file @
d6ca0cbb
...
@@ -278,9 +278,9 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
...
@@ -278,9 +278,9 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
int
strict_week_number_year
=
-
1
;
int
strict_week_number_year
=
-
1
;
int
frac_part
;
int
frac_part
;
bool
usa_time
=
0
;
bool
usa_time
=
0
;
bool
sunday_first_n_first_week_non_iso
;
bool
UNINIT_VAR
(
sunday_first_n_first_week_non_iso
)
;
bool
strict_week_number
;
bool
UNINIT_VAR
(
strict_week_number
)
;
bool
strict_week_number_year_type
;
bool
UNINIT_VAR
(
strict_week_number_year_type
)
;
const
char
*
val_begin
=
val
;
const
char
*
val_begin
=
val
;
const
char
*
val_end
=
val
+
length
;
const
char
*
val_end
=
val
+
length
;
const
char
*
ptr
=
format
->
format
.
str
;
const
char
*
ptr
=
format
->
format
.
str
;
...
@@ -288,11 +288,6 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
...
@@ -288,11 +288,6 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
CHARSET_INFO
*
cs
=
&
my_charset_bin
;
CHARSET_INFO
*
cs
=
&
my_charset_bin
;
DBUG_ENTER
(
"extract_date_time"
);
DBUG_ENTER
(
"extract_date_time"
);
LINT_INIT
(
strict_week_number
);
/* Remove valgrind varnings when using gcc 3.3 and -O1 */
PURIFY_OR_LINT_INIT
(
strict_week_number_year_type
);
PURIFY_OR_LINT_INIT
(
sunday_first_n_first_week_non_iso
);
if
(
!
sub_pattern_end
)
if
(
!
sub_pattern_end
)
bzero
((
char
*
)
l_time
,
sizeof
(
*
l_time
));
bzero
((
char
*
)
l_time
,
sizeof
(
*
l_time
));
...
...
sql/sql_handler.cc
View file @
d6ca0cbb
...
@@ -422,16 +422,13 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -422,16 +422,13 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
String
buffer
(
buff
,
sizeof
(
buff
),
system_charset_info
);
String
buffer
(
buff
,
sizeof
(
buff
),
system_charset_info
);
int
error
,
keyno
=
-
1
;
int
error
,
keyno
=
-
1
;
uint
num_rows
;
uint
num_rows
;
uchar
*
key
;
uchar
*
UNINIT_VAR
(
key
)
;
uint
key_len
;
uint
UNINIT_VAR
(
key_len
)
;
bool
need_reopen
;
bool
need_reopen
;
DBUG_ENTER
(
"mysql_ha_read"
);
DBUG_ENTER
(
"mysql_ha_read"
);
DBUG_PRINT
(
"enter"
,(
"'%s'.'%s' as '%s'"
,
DBUG_PRINT
(
"enter"
,(
"'%s'.'%s' as '%s'"
,
tables
->
db
,
tables
->
table_name
,
tables
->
alias
));
tables
->
db
,
tables
->
table_name
,
tables
->
alias
));
LINT_INIT
(
key
);
LINT_INIT
(
key_len
);
thd
->
lex
->
select_lex
.
context
.
resolve_in_table_list_only
(
tables
);
thd
->
lex
->
select_lex
.
context
.
resolve_in_table_list_only
(
tables
);
list
.
push_front
(
new
Item_field
(
&
thd
->
lex
->
select_lex
.
context
,
list
.
push_front
(
new
Item_field
(
&
thd
->
lex
->
select_lex
.
context
,
NULL
,
NULL
,
"*"
));
NULL
,
NULL
,
"*"
));
...
...
sql/udf_example.c
View file @
d6ca0cbb
...
@@ -139,10 +139,10 @@ typedef long long longlong;
...
@@ -139,10 +139,10 @@ typedef long long longlong;
#include <mysql.h>
#include <mysql.h>
#include <ctype.h>
#include <ctype.h>
static
pthread_mutex_t
LOCK_hostname
;
#ifdef HAVE_DLOPEN
#ifdef HAVE_DLOPEN
static
pthread_mutex_t
LOCK_hostname
;
/* These must be right or mysqld will not find the symbol! */
/* These must be right or mysqld will not find the symbol! */
my_bool
metaphon_init
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
message
);
my_bool
metaphon_init
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
message
);
...
...
storage/heap/hp_write.c
View file @
d6ca0cbb
...
@@ -196,13 +196,10 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
...
@@ -196,13 +196,10 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
HP_SHARE
*
share
=
info
->
s
;
HP_SHARE
*
share
=
info
->
s
;
int
flag
;
int
flag
;
ulong
halfbuff
,
hashnr
,
first_index
;
ulong
halfbuff
,
hashnr
,
first_index
;
uchar
*
ptr_to_rec
,
*
ptr_to_rec2
;
uchar
*
UNINIT_VAR
(
ptr_to_rec
),
*
UNINIT_VAR
(
ptr_to_rec2
)
;
HASH_INFO
*
empty
,
*
gpos
,
*
gpos2
,
*
pos
;
HASH_INFO
*
empty
,
*
UNINIT_VAR
(
gpos
),
*
UNINIT_VAR
(
gpos2
)
,
*
pos
;
DBUG_ENTER
(
"hp_write_key"
);
DBUG_ENTER
(
"hp_write_key"
);
LINT_INIT
(
gpos
);
LINT_INIT
(
gpos2
);
LINT_INIT
(
ptr_to_rec
);
LINT_INIT
(
ptr_to_rec2
);
flag
=
0
;
flag
=
0
;
if
(
!
(
empty
=
hp_find_free_hash
(
share
,
&
keyinfo
->
block
,
share
->
records
)))
if
(
!
(
empty
=
hp_find_free_hash
(
share
,
&
keyinfo
->
block
,
share
->
records
)))
DBUG_RETURN
(
-
1
);
/* No more memory */
DBUG_RETURN
(
-
1
);
/* No more memory */
...
...
storage/myisam/mi_search.c
View file @
d6ca0cbb
...
@@ -302,7 +302,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
...
@@ -302,7 +302,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar
*
end
,
*
kseg
,
*
vseg
;
uchar
*
end
,
*
kseg
,
*
vseg
;
uchar
*
sort_order
=
keyinfo
->
seg
->
charset
->
sort_order
;
uchar
*
sort_order
=
keyinfo
->
seg
->
charset
->
sort_order
;
uchar
tt_buff
[
MI_MAX_KEY_BUFF
+
2
],
*
t_buff
=
tt_buff
+
2
;
uchar
tt_buff
[
MI_MAX_KEY_BUFF
+
2
],
*
t_buff
=
tt_buff
+
2
;
uchar
*
saved_from
,
*
saved_to
,
*
saved_vseg
;
uchar
*
UNINIT_VAR
(
saved_from
),
*
UNINIT_VAR
(
saved_to
);
uchar
*
UNINIT_VAR
(
saved_vseg
);
uint
saved_length
=
0
,
saved_prefix_len
=
0
;
uint
saved_length
=
0
,
saved_prefix_len
=
0
;
uint
length_pack
;
uint
length_pack
;
DBUG_ENTER
(
"_mi_prefix_search"
);
DBUG_ENTER
(
"_mi_prefix_search"
);
...
@@ -310,9 +311,6 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
...
@@ -310,9 +311,6 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
LINT_INIT
(
length
);
LINT_INIT
(
length
);
LINT_INIT
(
prefix_len
);
LINT_INIT
(
prefix_len
);
LINT_INIT
(
seg_len_pack
);
LINT_INIT
(
seg_len_pack
);
LINT_INIT
(
saved_from
);
LINT_INIT
(
saved_to
);
LINT_INIT
(
saved_vseg
);
t_buff
[
0
]
=
0
;
/* Avoid bugs */
t_buff
[
0
]
=
0
;
/* Avoid bugs */
end
=
page
+
mi_getint
(
page
);
end
=
page
+
mi_getint
(
page
);
...
...
storage/myisam/mi_write.c
View file @
d6ca0cbb
...
@@ -712,8 +712,8 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
...
@@ -712,8 +712,8 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
uchar
*
key
,
uint
*
return_key_length
,
uchar
*
key
,
uint
*
return_key_length
,
uchar
**
after_key
)
uchar
**
after_key
)
{
{
uint
keys
,
length
,
last_length
,
key_ref_length
;
uint
keys
,
length
,
UNINIT_VAR
(
last_length
)
,
key_ref_length
;
uchar
*
end
,
*
lastpos
,
*
prevpos
;
uchar
*
end
,
*
lastpos
,
*
UNINIT_VAR
(
prevpos
)
;
uchar
key_buff
[
MI_MAX_KEY_BUFF
];
uchar
key_buff
[
MI_MAX_KEY_BUFF
];
DBUG_ENTER
(
"_mi_find_last_pos"
);
DBUG_ENTER
(
"_mi_find_last_pos"
);
...
@@ -732,8 +732,6 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
...
@@ -732,8 +732,6 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
DBUG_RETURN
(
end
);
DBUG_RETURN
(
end
);
}
}
LINT_INIT
(
prevpos
);
LINT_INIT
(
last_length
);
end
=
page
+
length
-
key_ref_length
;
end
=
page
+
length
-
key_ref_length
;
*
key
=
'\0'
;
*
key
=
'\0'
;
length
=
0
;
length
=
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