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
3e87b423
Commit
3e87b423
authored
Feb 10, 2012
by
Sunny Bains
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysql-5.1-innodb.
parents
6203acb0
a53f7618
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
storage/innobase/row/row0merge.c
storage/innobase/row/row0merge.c
+25
-6
storage/innobase/trx/trx0trx.c
storage/innobase/trx/trx0trx.c
+2
-0
No files found.
storage/innobase/row/row0merge.c
View file @
3e87b423
...
...
@@ -2010,7 +2010,7 @@ row_merge_drop_index(
tables in Innobase. Deleting a row from SYS_INDEXES table also
frees the file segments of the B-tree associated with the index. */
static
const
char
s
tr1
[]
=
static
const
char
s
ql
[]
=
"PROCEDURE DROP_INDEX_PROC () IS
\n
"
"BEGIN
\n
"
/* Rename the index, so that it will be dropped by
...
...
@@ -2034,9 +2034,19 @@ row_merge_drop_index(
ut_a
(
trx
->
dict_operation_lock_mode
==
RW_X_LATCH
);
err
=
que_eval_sql
(
info
,
s
tr1
,
FALSE
,
trx
);
err
=
que_eval_sql
(
info
,
s
ql
,
FALSE
,
trx
);
ut_a
(
err
==
DB_SUCCESS
);
if
(
err
!=
DB_SUCCESS
)
{
/* Even though we ensure that DDL transactions are WAIT
and DEADLOCK free, we could encounter other errors e.g.,
DB_TOO_MANY_TRANSACTIONS. */
trx
->
error_state
=
DB_SUCCESS
;
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Error: row_merge_drop_index failed "
"with error code: %lu.
\n
"
,
(
ulint
)
err
);
}
/* Replace this index with another equivalent index for all
foreign key constraints on this table where this index is used */
...
...
@@ -2336,7 +2346,7 @@ row_merge_rename_indexes(
/* We use the private SQL parser of Innobase to generate the
query graphs needed in renaming indexes. */
static
const
char
rename_indexes
[]
=
static
const
char
sql
[]
=
"PROCEDURE RENAME_INDEXES_PROC () IS
\n
"
"BEGIN
\n
"
"UPDATE SYS_INDEXES SET NAME=SUBSTR(NAME,1,LENGTH(NAME)-1)
\n
"
...
...
@@ -2352,7 +2362,7 @@ row_merge_rename_indexes(
pars_info_add_ull_literal
(
info
,
"tableid"
,
table
->
id
);
err
=
que_eval_sql
(
info
,
rename_indexes
,
FALSE
,
trx
);
err
=
que_eval_sql
(
info
,
sql
,
FALSE
,
trx
);
if
(
err
==
DB_SUCCESS
)
{
dict_index_t
*
index
=
dict_table_get_first_index
(
table
);
...
...
@@ -2362,6 +2372,15 @@ row_merge_rename_indexes(
}
index
=
dict_table_get_next_index
(
index
);
}
while
(
index
);
}
else
{
/* Even though we ensure that DDL transactions are WAIT
and DEADLOCK free, we could encounter other errors e.g.,
DB_TOO_MANY_TRANSACTIONS. */
trx
->
error_state
=
DB_SUCCESS
;
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Error: row_merge_rename_indexes "
"failed with error code: %lu.
\n
"
,
(
ulint
)
err
);
}
trx
->
op_info
=
""
;
...
...
@@ -2399,7 +2418,7 @@ row_merge_rename_tables(
memcpy
(
old_name
,
old_table
->
name
,
strlen
(
old_table
->
name
)
+
1
);
}
else
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
"InnoDB: too long table name: '%s', "
fprintf
(
stderr
,
"
InnoDB: too long table name: '%s', "
"max length is %d
\n
"
,
old_table
->
name
,
MAX_FULL_NAME_LEN
);
ut_error
;
...
...
storage/innobase/trx/trx0trx.c
View file @
3e87b423
...
...
@@ -1065,6 +1065,8 @@ trx_commit_off_kernel(
ut_ad
(
UT_LIST_GET_LEN
(
trx
->
trx_locks
)
==
0
);
UT_LIST_REMOVE
(
trx_list
,
trx_sys
->
trx_list
,
trx
);
trx
->
error_state
=
DB_SUCCESS
;
}
/****************************************************************//**
...
...
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