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
3bde1393
Commit
3bde1393
authored
Aug 03, 2014
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanups, fix compiler warnings
parent
d87ffeb4
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
19 deletions
+25
-19
extra/my_print_defaults.c
extra/my_print_defaults.c
+8
-3
sql/events.cc
sql/events.cc
+3
-1
sql/handler.cc
sql/handler.cc
+2
-3
sql/sql_class.cc
sql/sql_class.cc
+2
-2
storage/innobase/include/dict0dict.ic
storage/innobase/include/dict0dict.ic
+3
-3
storage/innobase/include/dict0pagecompress.ic
storage/innobase/include/dict0pagecompress.ic
+1
-1
storage/innobase/include/fsp0fsp.ic
storage/innobase/include/fsp0fsp.ic
+1
-1
storage/xtradb/include/dict0dict.ic
storage/xtradb/include/dict0dict.ic
+3
-3
storage/xtradb/include/dict0pagecompress.ic
storage/xtradb/include/dict0pagecompress.ic
+1
-1
storage/xtradb/include/fsp0fsp.ic
storage/xtradb/include/fsp0fsp.ic
+1
-1
No files found.
extra/my_print_defaults.c
View file @
3bde1393
...
@@ -98,6 +98,11 @@ static struct my_option my_long_options[] =
...
@@ -98,6 +98,11 @@ static struct my_option my_long_options[] =
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
};
};
void
cleanup_and_exit
(
int
exit_code
)
{
my_end
(
0
);
exit
(
exit_code
);
}
static
void
usage
(
my_bool
version
)
static
void
usage
(
my_bool
version
)
{
{
...
@@ -112,7 +117,7 @@ static void usage(my_bool version)
...
@@ -112,7 +117,7 @@ static void usage(my_bool version)
my_print_default_files
(
config_file
);
my_print_default_files
(
config_file
);
my_print_variables
(
my_long_options
);
my_print_variables
(
my_long_options
);
printf
(
"
\n
Example usage:
\n
%s --defaults-file=example.cnf client client-server mysql
\n
"
,
my_progname
);
printf
(
"
\n
Example usage:
\n
%s --defaults-file=example.cnf client client-server mysql
\n
"
,
my_progname
);
exit
(
0
);
cleanup_and_
exit
(
0
);
}
}
...
@@ -125,7 +130,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -125,7 +130,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_defaults_file_used
=
1
;
opt_defaults_file_used
=
1
;
break
;
break
;
case
'n'
:
case
'n'
:
exit
(
0
);
cleanup_and_
exit
(
0
);
case
'I'
:
case
'I'
:
case
'?'
:
case
'?'
:
usage
(
0
);
usage
(
0
);
...
@@ -174,7 +179,7 @@ int main(int argc, char **argv)
...
@@ -174,7 +179,7 @@ int main(int argc, char **argv)
/* Check out the args */
/* Check out the args */
if
(
get_options
(
&
argc
,
&
argv
))
if
(
get_options
(
&
argc
,
&
argv
))
exit
(
1
);
cleanup_and_
exit
(
1
);
nargs
=
argc
+
1
;
nargs
=
argc
+
1
;
if
(
opt_mysqld
)
if
(
opt_mysqld
)
...
...
sql/events.cc
View file @
3bde1393
...
@@ -270,6 +270,7 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval,
...
@@ -270,6 +270,7 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval,
static
int
static
int
create_query_string
(
THD
*
thd
,
String
*
buf
)
create_query_string
(
THD
*
thd
,
String
*
buf
)
{
{
buf
->
length
(
0
);
/* Append the "CREATE" part of the query */
/* Append the "CREATE" part of the query */
if
(
buf
->
append
(
STRING_WITH_LEN
(
"CREATE "
)))
if
(
buf
->
append
(
STRING_WITH_LEN
(
"CREATE "
)))
return
1
;
return
1
;
...
@@ -380,7 +381,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data,
...
@@ -380,7 +381,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data,
{
{
/* Binlog the create event. */
/* Binlog the create event. */
DBUG_ASSERT
(
thd
->
query
()
&&
thd
->
query_length
());
DBUG_ASSERT
(
thd
->
query
()
&&
thd
->
query_length
());
String
log_query
;
char
buffer
[
1024
];
String
log_query
(
buffer
,
sizeof
(
buffer
),
&
my_charset_bin
);
if
(
create_query_string
(
thd
,
&
log_query
))
if
(
create_query_string
(
thd
,
&
log_query
))
{
{
sql_print_error
(
"Event Error: An error occurred while creating query "
sql_print_error
(
"Event Error: An error occurred while creating query "
...
...
sql/handler.cc
View file @
3bde1393
...
@@ -1414,11 +1414,10 @@ int ha_commit_trans(THD *thd, bool all)
...
@@ -1414,11 +1414,10 @@ int ha_commit_trans(THD *thd, bool all)
err
=
ht
->
prepare
(
ht
,
thd
,
all
);
err
=
ht
->
prepare
(
ht
,
thd
,
all
);
status_var_increment
(
thd
->
status_var
.
ha_prepare_count
);
status_var_increment
(
thd
->
status_var
.
ha_prepare_count
);
if
(
err
)
if
(
err
)
{
my_error
(
ER_ERROR_DURING_COMMIT
,
MYF
(
0
),
err
);
my_error
(
ER_ERROR_DURING_COMMIT
,
MYF
(
0
),
err
);
if
(
err
)
goto
err
;
goto
err
;
}
need_prepare_ordered
|=
(
ht
->
prepare_ordered
!=
NULL
);
need_prepare_ordered
|=
(
ht
->
prepare_ordered
!=
NULL
);
need_commit_ordered
|=
(
ht
->
commit_ordered
!=
NULL
);
need_commit_ordered
|=
(
ht
->
commit_ordered
!=
NULL
);
}
}
...
...
sql/sql_class.cc
View file @
3bde1393
...
@@ -1355,8 +1355,8 @@ void THD::init(void)
...
@@ -1355,8 +1355,8 @@ void THD::init(void)
mysql_mutex_lock
(
&
LOCK_global_system_variables
);
mysql_mutex_lock
(
&
LOCK_global_system_variables
);
plugin_thdvar_init
(
this
);
plugin_thdvar_init
(
this
);
/*
/*
variables= global_system_variables above has reset
plugin_thd_var_init() sets variables= global_system_variables, which
variables.pseudo_thread_id to 0. We need to correct it here to
has reset
variables.pseudo_thread_id to 0. We need to correct it here to
avoid temporary tables replication failure.
avoid temporary tables replication failure.
*/
*/
variables
.
pseudo_thread_id
=
thread_id
;
variables
.
pseudo_thread_id
=
thread_id
;
...
...
storage/innobase/include/dict0dict.ic
View file @
3bde1393
...
@@ -647,7 +647,7 @@ dict_tf_is_valid(
...
@@ -647,7 +647,7 @@ dict_tf_is_valid(
if (atomic_writes) {
if (atomic_writes) {
if(atomic_writes
< 0 || atomic_writes
> ATOMIC_WRITES_OFF) {
if(atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr,
fprintf(stderr,
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
...
@@ -689,7 +689,7 @@ dict_sys_tables_type_validate(
...
@@ -689,7 +689,7 @@ dict_sys_tables_type_validate(
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type);
ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type);
ut_a(atomic_writes
>= 0 && atomic_writes
<= ATOMIC_WRITES_OFF);
ut_a(atomic_writes <= ATOMIC_WRITES_OFF);
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
If the format is UNIV_FORMAT_B or higher, this field is the same
If the format is UNIV_FORMAT_B or higher, this field is the same
...
@@ -768,7 +768,7 @@ dict_sys_tables_type_validate(
...
@@ -768,7 +768,7 @@ dict_sys_tables_type_validate(
}
}
/* Validate that the atomic writes number is within allowed range. */
/* Validate that the atomic writes number is within allowed range. */
if (atomic_writes
< 0 || atomic_writes
> ATOMIC_WRITES_OFF) {
if (atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=%lu, atomic_writes %lu\n",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=%lu, atomic_writes %lu\n",
type, atomic_writes);
type, atomic_writes);
return(ULINT_UNDEFINED);
return(ULINT_UNDEFINED);
...
...
storage/innobase/include/dict0pagecompress.ic
View file @
3bde1393
...
@@ -122,7 +122,7 @@ dict_tf_get_page_compression_level(
...
@@ -122,7 +122,7 @@ dict_tf_get_page_compression_level(
{
{
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(flags);
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(flags);
ut_ad(page_compression_level
>= 0 && page_compression_level
<= 9);
ut_ad(page_compression_level <= 9);
return(page_compression_level);
return(page_compression_level);
}
}
...
...
storage/innobase/include/fsp0fsp.ic
View file @
3bde1393
...
@@ -131,7 +131,7 @@ fsp_flags_is_valid(
...
@@ -131,7 +131,7 @@ fsp_flags_is_valid(
}
}
}
}
if (atomic_writes
< 0 || atomic_writes
> ATOMIC_WRITES_OFF) {
if (atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted atomic_writes %lu\n",
fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted atomic_writes %lu\n",
flags, atomic_writes);
flags, atomic_writes);
return (false);
return (false);
...
...
storage/xtradb/include/dict0dict.ic
View file @
3bde1393
...
@@ -651,7 +651,7 @@ dict_tf_is_valid(
...
@@ -651,7 +651,7 @@ dict_tf_is_valid(
if (atomic_writes) {
if (atomic_writes) {
if(atomic_writes
< 0 || atomic_writes
> ATOMIC_WRITES_OFF) {
if(atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr,
fprintf(stderr,
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
...
@@ -693,7 +693,7 @@ dict_sys_tables_type_validate(
...
@@ -693,7 +693,7 @@ dict_sys_tables_type_validate(
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type);
ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type);
ut_a(atomic_writes
>= 0 && atomic_writes
<= ATOMIC_WRITES_OFF);
ut_a(atomic_writes <= ATOMIC_WRITES_OFF);
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
If the format is UNIV_FORMAT_B or higher, this field is the same
If the format is UNIV_FORMAT_B or higher, this field is the same
...
@@ -772,7 +772,7 @@ dict_sys_tables_type_validate(
...
@@ -772,7 +772,7 @@ dict_sys_tables_type_validate(
}
}
/* Validate that the atomic writes number is within allowed range. */
/* Validate that the atomic writes number is within allowed range. */
if (atomic_writes
< 0 || atomic_writes
> ATOMIC_WRITES_OFF) {
if (atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=%lu, atomic_writes %lu\n",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=%lu, atomic_writes %lu\n",
type, atomic_writes);
type, atomic_writes);
return(ULINT_UNDEFINED);
return(ULINT_UNDEFINED);
...
...
storage/xtradb/include/dict0pagecompress.ic
View file @
3bde1393
...
@@ -122,7 +122,7 @@ dict_tf_get_page_compression_level(
...
@@ -122,7 +122,7 @@ dict_tf_get_page_compression_level(
{
{
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(flags);
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(flags);
ut_ad(page_compression_level
>= 0 && page_compression_level
<= 9);
ut_ad(page_compression_level <= 9);
return(page_compression_level);
return(page_compression_level);
}
}
...
...
storage/xtradb/include/fsp0fsp.ic
View file @
3bde1393
...
@@ -135,7 +135,7 @@ fsp_flags_is_valid(
...
@@ -135,7 +135,7 @@ fsp_flags_is_valid(
}
}
}
}
if (atomic_writes
< 0 || atomic_writes
> ATOMIC_WRITES_OFF) {
if (atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted atomic_writes %lu\n",
fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted atomic_writes %lu\n",
flags, atomic_writes);
flags, atomic_writes);
return (false);
return (false);
...
...
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