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
f971c044
Commit
f971c044
authored
Sep 07, 2011
by
Vasil Dimov
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 -> mysql-5.5
parents
ab82b5e5
42568012
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
storage/innobase/row/row0mysql.c
storage/innobase/row/row0mysql.c
+19
-10
No files found.
storage/innobase/row/row0mysql.c
View file @
f971c044
...
...
@@ -3247,6 +3247,19 @@ row_drop_table_for_mysql(
"index_id CHAR;
\n
"
"foreign_id CHAR;
\n
"
"found INT;
\n
"
"DECLARE CURSOR cur_fk IS
\n
"
"SELECT ID FROM SYS_FOREIGN
\n
"
"WHERE FOR_NAME = :table_name
\n
"
"AND TO_BINARY(FOR_NAME)
\n
"
" = TO_BINARY(:table_name)
\n
"
"LOCK IN SHARE MODE;
\n
"
"DECLARE CURSOR cur_idx IS
\n
"
"SELECT ID FROM SYS_INDEXES
\n
"
"WHERE TABLE_ID = table_id
\n
"
"LOCK IN SHARE MODE;
\n
"
"BEGIN
\n
"
"SELECT ID INTO table_id
\n
"
"FROM SYS_TABLES
\n
"
...
...
@@ -3269,13 +3282,9 @@ row_drop_table_for_mysql(
"IF (:table_name = 'SYS_FOREIGN_COLS') THEN
\n
"
" found := 0;
\n
"
"END IF;
\n
"
"OPEN cur_fk;
\n
"
"WHILE found = 1 LOOP
\n
"
" SELECT ID INTO foreign_id
\n
"
" FROM SYS_FOREIGN
\n
"
" WHERE FOR_NAME = :table_name
\n
"
" AND TO_BINARY(FOR_NAME)
\n
"
" = TO_BINARY(:table_name)
\n
"
" LOCK IN SHARE MODE;
\n
"
" FETCH cur_fk INTO foreign_id;
\n
"
" IF (SQL % NOTFOUND) THEN
\n
"
" found := 0;
\n
"
" ELSE
\n
"
...
...
@@ -3285,12 +3294,11 @@ row_drop_table_for_mysql(
" WHERE ID = foreign_id;
\n
"
" END IF;
\n
"
"END LOOP;
\n
"
"CLOSE cur_fk;
\n
"
"found := 1;
\n
"
"OPEN cur_idx;
\n
"
"WHILE found = 1 LOOP
\n
"
" SELECT ID INTO index_id
\n
"
" FROM SYS_INDEXES
\n
"
" WHERE TABLE_ID = table_id
\n
"
" LOCK IN SHARE MODE;
\n
"
" FETCH cur_idx INTO index_id;
\n
"
" IF (SQL % NOTFOUND) THEN
\n
"
" found := 0;
\n
"
" ELSE
\n
"
...
...
@@ -3301,6 +3309,7 @@ row_drop_table_for_mysql(
" AND TABLE_ID = table_id;
\n
"
" END IF;
\n
"
"END LOOP;
\n
"
"CLOSE cur_idx;
\n
"
"DELETE FROM SYS_COLUMNS
\n
"
"WHERE TABLE_ID = table_id;
\n
"
"DELETE FROM SYS_TABLES
\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