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
9ecec1f7
Commit
9ecec1f7
authored
May 19, 2024
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: old_mode_deprecated
make it easier to add more old-mode values
parent
fd3b7f5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
19 deletions
+18
-19
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sys_vars.cc
sql/sys_vars.cc
+16
-17
No files found.
sql/mysqld.cc
View file @
9ecec1f7
...
...
@@ -4183,7 +4183,7 @@ static int init_common_variables()
myf
utf8_flag
=
global_system_variables
.
old_behavior
&
OLD_MODE_UTF8_IS_UTF8MB3
?
MY_UTF8_IS_UTF8MB3
:
0
;
old_mode_deprecated_warnings
(
0
,
global_system_variables
.
old_behavior
);
old_mode_deprecated_warnings
(
global_system_variables
.
old_behavior
);
if
(
character_set_collations_str
[
0
])
{
...
...
sql/sql_class.h
View file @
9ecec1f7
...
...
@@ -210,7 +210,7 @@ enum enum_binlog_row_image {
#define OLD_MODE_DEFAULT_VALUE OLD_MODE_UTF8_IS_UTF8MB3
void
old_mode_deprecated_warnings
(
THD
*
thd
,
ulonglong
v
);
void
old_mode_deprecated_warnings
(
ulonglong
v
);
extern
char
internal_table_name
[
2
];
extern
char
empty_c_string
[
1
];
...
...
sql/sys_vars.cc
View file @
9ecec1f7
...
...
@@ -3947,34 +3947,33 @@ static Sys_var_set Sys_sql_mode(
static
const
char
*
old_mode_names
[]
=
{
"NO_DUP_KEY_WARNINGS_WITH_IGNORE"
,
// deprecated since 11.3
"NO_PROGRESS_INFO"
,
// deprecated since 11.3
"ZERO_DATE_TIME_CAST"
,
// deprecated since 11.3
"UTF8_IS_UTF8MB3"
,
"IGNORE_INDEX_ONLY_FOR_JOIN"
,
// deprecated since 11.3
"COMPAT_5_1_CHECKSUM"
,
// deprecated since 11.3
"NO_NULL_COLLATION_IDS"
,
// deprecated since 11.3
"LOCK_ALTER_TABLE_COPY"
,
// deprecated since 11.3
"NO_DUP_KEY_WARNINGS_WITH_IGNORE"
,
//
0:
deprecated since 11.3
"NO_PROGRESS_INFO"
,
//
1:
deprecated since 11.3
"ZERO_DATE_TIME_CAST"
,
//
2:
deprecated since 11.3
"UTF8_IS_UTF8MB3"
,
// 3: on by default
"IGNORE_INDEX_ONLY_FOR_JOIN"
,
//
4:
deprecated since 11.3
"COMPAT_5_1_CHECKSUM"
,
//
5:
deprecated since 11.3
"NO_NULL_COLLATION_IDS"
,
//
6:
deprecated since 11.3
"LOCK_ALTER_TABLE_COPY"
,
//
7:
deprecated since 11.3
0
};
void
old_mode_deprecated_warnings
(
THD
*
thd
,
ulonglong
v
)
void
old_mode_deprecated_warnings
(
ulonglong
v
)
{
v
&=
~
OLD_MODE_DEFAULT_VALUE
;
for
(
uint
i
=
0
;
old_mode_names
[
i
];
i
++
)
if
((
1ULL
<<
i
)
&
v
)
{
if
(
thd
)
warn_deprecated
<
1103
>
(
thd
,
old_mode_names
[
i
]);
else
sql_print_warning
(
"--old-mode='%s' is deprecated and will be "
"removed in a future release"
,
old_mode_names
[
i
]);
}
}
static
bool
old_mode_deprecated
(
sys_var
*
self
,
THD
*
thd
,
set_var
*
var
)
{
old_mode_deprecated_warnings
(
thd
,
var
->
save_result
.
ulonglong_value
);
ulonglong
v
=
var
->
save_result
.
ulonglong_value
&
~
OLD_MODE_DEFAULT_VALUE
;
uint
i
=
0
;
for
(;
i
<=
7
;
i
++
)
if
((
1ULL
<<
i
)
&
v
)
warn_deprecated
<
1103
>
(
thd
,
old_mode_names
[
i
]);
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