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
581b8504
Commit
581b8504
authored
Apr 30, 2007
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#2936 - Falcon & MySQL plugin interface: server variables
Avoid compiler warnings
parent
1bd2953c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
44 deletions
+48
-44
cmd-line-utils/readline/rltty.c
cmd-line-utils/readline/rltty.c
+1
-2
config/ac-macros/misc.m4
config/ac-macros/misc.m4
+2
-2
mysys/my_getopt.c
mysys/my_getopt.c
+8
-4
sql/mysqld.cc
sql/mysqld.cc
+3
-1
sql/sql_parse.cc
sql/sql_parse.cc
+31
-31
sql/sql_plugin.cc
sql/sql_plugin.cc
+3
-4
No files found.
cmd-line-utils/readline/rltty.c
View file @
581b8504
...
...
@@ -139,8 +139,7 @@ static int ksrflow;
/* Dummy call to force a backgrounded readline to stop before it tries
to get the tty settings. */
static
void
set_winsize
(
tty
)
int
tty
;
set_winsize
(
int
tty
__attribute__
((
unused
)))
{
#if defined (TIOCGWINSZ)
struct
winsize
w
;
...
...
config/ac-macros/misc.m4
View file @
581b8504
...
...
@@ -479,7 +479,7 @@ AC_MSG_CHECKING(if conversion of longlong to float works)
AC_CACHE_VAL(ac_cv_conv_longlong_to_float,
[AC_TRY_RUN([#include <stdio.h>
typedef long long longlong;
main()
int
main()
{
longlong ll=1;
float f;
...
...
@@ -487,7 +487,7 @@ main()
f = (float) ll;
fprintf(file,"%g\n",f);
fclose(file);
exit
(0);
return
(0);
}], ac_cv_conv_longlong_to_float=`cat conftestval`, ac_cv_conv_longlong_to_float=0, ifelse([$2], , , ac_cv_conv_longlong_to_float=$2))])dnl
if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
then
...
...
mysys/my_getopt.c
View file @
581b8504
...
...
@@ -842,19 +842,23 @@ static void init_one_value(const struct my_option *option, gptr *variable,
/*
Do not clear variable value if it has no default value.
The default value may already be set.
NOTE: To avoid compiler warnings, we first cast longlong to intptr,
so that the value has the same size as a pointer.
*/
if
((
char
*
)
value
)
*
((
char
**
)
variable
)
=
(
char
*
)
value
;
if
((
char
*
)
(
intptr
)
value
)
*
((
char
**
)
variable
)
=
(
char
*
)
(
intptr
)
value
;
break
;
case
GET_STR_ALLOC
:
/*
Do not clear variable value if it has no default value.
The default value may already be set.
NOTE: To avoid compiler warnings, we first cast longlong to intptr,
so that the value has the same size as a pointer.
*/
if
((
char
*
)
value
)
if
((
char
*
)
(
intptr
)
value
)
{
my_free
((
*
(
char
**
)
variable
),
MYF
(
MY_ALLOW_ZERO_PTR
));
*
((
char
**
)
variable
)
=
my_strdup
((
char
*
)
value
,
MYF
(
MY_WME
));
*
((
char
**
)
variable
)
=
my_strdup
((
char
*
)
(
intptr
)
value
,
MYF
(
MY_WME
));
}
break
;
default:
/* dummy default to avoid compiler warnings */
...
...
sql/mysqld.cc
View file @
581b8504
...
...
@@ -677,7 +677,6 @@ pthread_handler_t signal_hand(void *arg);
static
void
mysql_init_variables
(
void
);
static
void
get_options
(
int
*
argc
,
char
**
argv
);
static
my_bool
get_one_option
(
int
,
const
struct
my_option
*
,
char
*
);
static
void
usage
(
void
);
static
void
set_server_version
(
void
);
static
int
init_thread_environment
();
static
char
*
get_relative_path
(
const
char
*
path
);
...
...
@@ -700,6 +699,7 @@ static void clean_up(bool print_message);
static
int
test_if_case_insensitive
(
const
char
*
dir_name
);
#ifndef EMBEDDED_LIBRARY
static
void
usage
(
void
);
static
void
start_signal_handler
(
void
);
static
void
close_server_sock
();
static
void
clean_up_mutexes
(
void
);
...
...
@@ -6877,6 +6877,7 @@ static void print_version(void)
server_version
,
SYSTEM_TYPE
,
MACHINE_TYPE
,
MYSQL_COMPILATION_COMMENT
);
}
#ifndef EMBEDDED_LIBRARY
static
void
usage
(
void
)
{
if
(
!
(
default_charset_info
=
get_charset_by_csname
(
default_character_set_name
,
...
...
@@ -6922,6 +6923,7 @@ To see what values a running MySQL server is using, type\n\
'mysqladmin variables' instead of 'mysqld --verbose --help'.
\n
"
);
}
}
#endif
/*!EMBEDDED_LIBRARY*/
/*
...
...
sql/sql_parse.cc
View file @
581b8504
...
...
@@ -43,37 +43,37 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables);
const
char
*
any_db
=
"*any*"
;
// Special symbol for check_access
const
LEX_STRING
command_name
[]
=
{
{
STRING_WITH_LEN
(
"Sleep"
)
},
{
STRING_WITH_LEN
(
"Quit"
)
},
{
STRING_WITH_LEN
(
"Init DB"
)
},
{
STRING_WITH_LEN
(
"Query"
)
},
{
STRING_WITH_LEN
(
"Field List"
)
},
{
STRING_WITH_LEN
(
"Create DB"
)
},
{
STRING_WITH_LEN
(
"Drop DB"
)
},
{
STRING_WITH_LEN
(
"Refresh"
)
},
{
STRING_WITH_LEN
(
"Shutdown"
)
},
{
STRING_WITH_LEN
(
"Statistics"
)
},
{
STRING_WITH_LEN
(
"Processlist"
)
},
{
STRING_WITH_LEN
(
"Connect"
)
},
{
STRING_WITH_LEN
(
"Kill"
)
},
{
STRING_WITH_LEN
(
"Debug"
)
},
{
STRING_WITH_LEN
(
"Ping"
)
},
{
STRING_WITH_LEN
(
"Time"
)
},
{
STRING_WITH_LEN
(
"Delayed insert"
)
},
{
STRING_WITH_LEN
(
"Change user"
)
},
{
STRING_WITH_LEN
(
"Binlog Dump"
)
},
{
STRING_WITH_LEN
(
"Table Dump"
)
},
{
STRING_WITH_LEN
(
"Connect Out"
)
},
{
STRING_WITH_LEN
(
"Register Slave"
)
},
{
STRING_WITH_LEN
(
"Prepare"
)
},
{
STRING_WITH_LEN
(
"Execute"
)
},
{
STRING_WITH_LEN
(
"Long Data"
)
},
{
STRING_WITH_LEN
(
"Close stmt"
)
},
{
STRING_WITH_LEN
(
"Reset stmt"
)
},
{
STRING_WITH_LEN
(
"Set option"
)
},
{
STRING_WITH_LEN
(
"Fetch"
)
},
{
STRING_WITH_LEN
(
"Daemon"
)
},
{
STRING_WITH_LEN
(
"Error"
)
}
// Last command number
{
C_
STRING_WITH_LEN
(
"Sleep"
)
},
{
C_
STRING_WITH_LEN
(
"Quit"
)
},
{
C_
STRING_WITH_LEN
(
"Init DB"
)
},
{
C_
STRING_WITH_LEN
(
"Query"
)
},
{
C_
STRING_WITH_LEN
(
"Field List"
)
},
{
C_
STRING_WITH_LEN
(
"Create DB"
)
},
{
C_
STRING_WITH_LEN
(
"Drop DB"
)
},
{
C_
STRING_WITH_LEN
(
"Refresh"
)
},
{
C_
STRING_WITH_LEN
(
"Shutdown"
)
},
{
C_
STRING_WITH_LEN
(
"Statistics"
)
},
{
C_
STRING_WITH_LEN
(
"Processlist"
)
},
{
C_
STRING_WITH_LEN
(
"Connect"
)
},
{
C_
STRING_WITH_LEN
(
"Kill"
)
},
{
C_
STRING_WITH_LEN
(
"Debug"
)
},
{
C_
STRING_WITH_LEN
(
"Ping"
)
},
{
C_
STRING_WITH_LEN
(
"Time"
)
},
{
C_
STRING_WITH_LEN
(
"Delayed insert"
)
},
{
C_
STRING_WITH_LEN
(
"Change user"
)
},
{
C_
STRING_WITH_LEN
(
"Binlog Dump"
)
},
{
C_
STRING_WITH_LEN
(
"Table Dump"
)
},
{
C_
STRING_WITH_LEN
(
"Connect Out"
)
},
{
C_
STRING_WITH_LEN
(
"Register Slave"
)
},
{
C_
STRING_WITH_LEN
(
"Prepare"
)
},
{
C_
STRING_WITH_LEN
(
"Execute"
)
},
{
C_
STRING_WITH_LEN
(
"Long Data"
)
},
{
C_
STRING_WITH_LEN
(
"Close stmt"
)
},
{
C_
STRING_WITH_LEN
(
"Reset stmt"
)
},
{
C_
STRING_WITH_LEN
(
"Set option"
)
},
{
C_
STRING_WITH_LEN
(
"Fetch"
)
},
{
C_
STRING_WITH_LEN
(
"Daemon"
)
},
{
C_
STRING_WITH_LEN
(
"Error"
)
}
// Last command number
};
const
char
*
xa_state_names
[]
=
{
...
...
sql/sql_plugin.cc
View file @
581b8504
...
...
@@ -2506,10 +2506,9 @@ byte* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type,
result
=
real_value_ptr
(
thd
,
type
);
if
((
plugin_var
->
flags
&
&
PLUGIN_VAR_TYPEMASK
)
==
PLUGIN_VAR_ENUM
)
if
((
plugin_var
->
flags
&
PLUGIN_VAR_TYPEMASK
)
==
PLUGIN_VAR_ENUM
)
result
=
(
byte
*
)
get_type
(
plugin_var_typelib
(),
*
(
ulong
*
)
result
);
else
if
((
plugin_var
->
flags
&&
PLUGIN_VAR_TYPEMASK
)
==
PLUGIN_VAR_SET
)
else
if
((
plugin_var
->
flags
&
PLUGIN_VAR_TYPEMASK
)
==
PLUGIN_VAR_SET
)
{
char
buffer
[
STRING_BUFFER_USUAL_SIZE
];
String
str
(
buffer
,
sizeof
(
buffer
),
system_charset_info
);
...
...
@@ -2620,7 +2619,7 @@ bool sys_var_pluginvar::update(THD *thd, set_var *var)
options->def_value= (opt)->def_val; \
options->min_value= (opt)->min_val; \
options->max_value= (opt)->max_val; \
options->block_size= (opt)->blk_sz
options->block_size= (
long) (
opt)->blk_sz
static
void
plugin_opt_set_limits
(
struct
my_option
*
options
,
...
...
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