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
b89e6ccf
Commit
b89e6ccf
authored
Jul 25, 2013
by
Annamalai Gurusami
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysql-5.1 to mysql-5.5
parents
03940a7b
a1ccfcf8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+4
-2
storage/innobase/row/row0mysql.c
storage/innobase/row/row0mysql.c
+19
-1
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
b89e6ccf
...
...
@@ -1205,7 +1205,8 @@ innobase_convert_from_id(
}
/**********************************************************************
Converts an identifier from my_charset_filename to UTF-8 charset. */
Converts an identifier from my_charset_filename to UTF-8 charset.
@return result string length, as returned by strconvert() */
extern
"C"
uint
innobase_convert_to_system_charset
(
...
...
@@ -12022,7 +12023,8 @@ test_innobase_convert_name()
#endif
/* UNIV_COMPILE_TEST_FUNCS */
/**********************************************************************
Converts an identifier from my_charset_filename to UTF-8 charset. */
Converts an identifier from my_charset_filename to UTF-8 charset.
@return result string length, as returned by strconvert() */
extern
"C"
uint
innobase_convert_to_filename_charset
(
...
...
storage/innobase/row/row0mysql.c
View file @
b89e6ccf
...
...
@@ -3958,12 +3958,28 @@ row_rename_table_for_mysql(
}
else
if
(
!
new_is_tmp
)
{
/* Rename all constraints. */
char
new_table_name
[
MAX_TABLE_NAME_LEN
]
=
""
;
char
old_table_utf8
[
MAX_TABLE_NAME_LEN
]
=
""
;
uint
errors
=
0
;
strncpy
(
old_table_utf8
,
old_name
,
MAX_TABLE_NAME_LEN
);
innobase_convert_to_system_charset
(
strchr
(
old_table_utf8
,
'/'
)
+
1
,
strchr
(
old_name
,
'/'
)
+
1
,
MAX_TABLE_NAME_LEN
,
&
errors
);
if
(
errors
)
{
/* Table name could not be converted from charset
my_charset_filename to UTF-8. This means that the
table name is already in UTF-8 (#mysql#50). */
strncpy
(
old_table_utf8
,
old_name
,
MAX_TABLE_NAME_LEN
);
}
info
=
pars_info_create
();
pars_info_add_str_literal
(
info
,
"new_table_name"
,
new_name
);
pars_info_add_str_literal
(
info
,
"old_table_name"
,
old_name
);
pars_info_add_str_literal
(
info
,
"old_table_name_utf8"
,
old_table_utf8
);
strncpy
(
new_table_name
,
new_name
,
MAX_TABLE_NAME_LEN
);
innobase_convert_to_system_charset
(
...
...
@@ -4000,6 +4016,8 @@ row_rename_table_for_mysql(
"new_db_name := SUBSTR(:new_table_name, 0,
\n
"
" new_db_name_len);
\n
"
"old_t_name_len := LENGTH(:old_table_name);
\n
"
"gen_constr_prefix := CONCAT(:old_table_name_utf8,
\n
"
" '_ibfk_');
\n
"
"WHILE found = 1 LOOP
\n
"
" SELECT ID INTO foreign_id
\n
"
" FROM SYS_FOREIGN
\n
"
...
...
@@ -4016,7 +4034,7 @@ row_rename_table_for_mysql(
" id_len := LENGTH(foreign_id);
\n
"
" IF (INSTR(foreign_id, '/') > 0) THEN
\n
"
" IF (INSTR(foreign_id,
\n
"
"
'_ibfk_'
) > 0)
\n
"
"
gen_constr_prefix
) > 0)
\n
"
" THEN
\n
"
" offset := INSTR(foreign_id, '_ibfk_') - 1;
\n
"
" new_foreign_id :=
\n
"
...
...
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