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
15ec8c2f
Commit
15ec8c2f
authored
Apr 26, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'merge-innodb-5.6' into 10.0
parents
619afb15
5883c690
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
26 deletions
+54
-26
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+33
-18
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+1
-1
storage/innobase/row/row0import.cc
storage/innobase/row/row0import.cc
+6
-1
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+10
-2
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+4
-4
No files found.
storage/innobase/handler/handler0alter.cc
View file @
15ec8c2f
/*****************************************************************************
Copyright (c) 2005, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2005, 201
8
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
...
...
@@ -4758,13 +4758,15 @@ innobase_rename_columns_cache(
}
/** Get the auto-increment value of the table on commit.
@param ha_alter_info Data used during in-place alter
@param ctx In-place ALTER TABLE context
@param altered_table MySQL table that is being altered
@param old_table MySQL table as it is before the ALTER operation
@return the next auto-increment value (0 if not present) */
@param[in] ha_alter_info Data used during in-place alter
@param[in,out] ctx In-place ALTER TABLE context
return autoinc value in ctx->max_autoinc
@param altered_table[in] MySQL table that is being altered
@param old_table[in] MySQL table as it is before the ALTER operation
retval true Failure
@retval false Success*/
static
MY_ATTRIBUTE
((
nonnull
,
warn_unused_result
))
ulonglong
bool
commit_get_autoinc
(
/*===============*/
Alter_inplace_info
*
ha_alter_info
,
...
...
@@ -4772,23 +4774,28 @@ commit_get_autoinc(
const
TABLE
*
altered_table
,
const
TABLE
*
old_table
)
{
ulonglong
max_autoinc
;
DBUG_ENTER
(
"commit_get_autoinc"
);
if
(
!
altered_table
->
found_next_number_field
)
{
/* There is no AUTO_INCREMENT column in the table
after the ALTER operation. */
max_autoinc
=
0
;
ctx
->
max_autoinc
=
0
;
}
else
if
(
ctx
->
add_autoinc
!=
ULINT_UNDEFINED
)
{
/* An AUTO_INCREMENT column was added. Get the last
value from the sequence, which may be based on a
supplied AUTO_INCREMENT value. */
max_autoinc
=
ctx
->
sequence
.
last
();
ctx
->
max_autoinc
=
ctx
->
sequence
.
last
();
}
else
if
((
ha_alter_info
->
handler_flags
&
Alter_inplace_info
::
CHANGE_CREATE_OPTION
)
&&
(
ha_alter_info
->
create_info
->
used_fields
&
HA_CREATE_USED_AUTO
))
{
/* Check if the table is discarded */
if
(
dict_table_is_discarded
(
ctx
->
old_table
))
{
DBUG_RETURN
(
true
);
}
/* An AUTO_INCREMENT value was supplied, but the table was not
rebuilt. Get the user-supplied value or the last value from the
sequence. */
...
...
@@ -4803,7 +4810,8 @@ commit_get_autoinc(
dict_index_t
*
index
=
dict_table_get_index_on_name
(
ctx
->
old_table
,
autoinc_key
->
name
);
max_autoinc
=
ha_alter_info
->
create_info
->
auto_increment_value
;
ctx
->
max_autoinc
=
ha_alter_info
->
create_info
->
auto_increment_value
;
dict_table_autoinc_lock
(
ctx
->
old_table
);
...
...
@@ -4812,8 +4820,8 @@ commit_get_autoinc(
if
(
err
!=
DB_SUCCESS
)
{
ut_ad
(
0
);
max_autoinc
=
0
;
}
else
if
(
max_autoinc
<=
max_value_table
)
{
ctx
->
max_autoinc
=
0
;
}
else
if
(
ctx
->
max_autoinc
<=
max_value_table
)
{
ulonglong
col_max_value
;
ulonglong
offset
;
...
...
@@ -4821,7 +4829,7 @@ commit_get_autoinc(
old_table
->
found_next_number_field
);
offset
=
ctx
->
prebuilt
->
autoinc_offset
;
max_autoinc
=
innobase_next_autoinc
(
ctx
->
max_autoinc
=
innobase_next_autoinc
(
max_value_table
,
1
,
1
,
offset
,
col_max_value
);
}
...
...
@@ -4831,11 +4839,11 @@ commit_get_autoinc(
Read the old counter value from the table. */
ut_ad
(
old_table
->
found_next_number_field
);
dict_table_autoinc_lock
(
ctx
->
old_table
);
max_autoinc
=
ctx
->
old_table
->
autoinc
;
ctx
->
max_autoinc
=
ctx
->
old_table
->
autoinc
;
dict_table_autoinc_unlock
(
ctx
->
old_table
);
}
DBUG_RETURN
(
max_autoinc
);
DBUG_RETURN
(
false
);
}
/** Add or drop foreign key constraints to the data dictionary tables,
...
...
@@ -5817,8 +5825,13 @@ ha_innobase::commit_inplace_alter_table(
DBUG_ASSERT
(
new_clustered
==
ctx
->
need_rebuild
());
ctx
->
max_autoinc
=
commit_get_autoinc
(
ha_alter_info
,
ctx
,
altered_table
,
table
);
if
(
commit_get_autoinc
(
ha_alter_info
,
ctx
,
altered_table
,
table
))
{
fail
=
true
;
my_error
(
ER_TABLESPACE_DISCARDED
,
MYF
(
0
),
table
->
s
->
table_name
.
str
);
goto
rollback_trx
;
}
if
(
ctx
->
need_rebuild
())
{
ctx
->
tmp_name
=
dict_mem_create_temporary_tablename
(
...
...
@@ -5850,6 +5863,8 @@ ha_innobase::commit_inplace_alter_table(
#endif
}
rollback_trx:
/* Commit or roll back the changes to the data dictionary. */
if
(
fail
)
{
...
...
storage/innobase/include/univ.i
View file @
15ec8c2f
...
...
@@ -45,7 +45,7 @@ Created 1/20/1994 Heikki Tuuri
#
define
INNODB_VERSION_MAJOR
5
#
define
INNODB_VERSION_MINOR
6
#
define
INNODB_VERSION_BUGFIX
37
#
define
INNODB_VERSION_BUGFIX
40
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;
...
...
storage/innobase/row/row0import.cc
View file @
15ec8c2f
/*****************************************************************************
Copyright (c) 2012, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, 201
8
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
...
...
@@ -1826,6 +1826,7 @@ PageConverter::update_records(
while
(
!
m_rec_iter
.
end
())
{
rec_t
*
rec
=
m_rec_iter
.
current
();
ibool
deleted
=
rec_get_deleted_flag
(
rec
,
comp
);
/* For the clustered index we have to adjust the BLOB
...
...
@@ -1927,6 +1928,10 @@ PageConverter::update_index_page(
return
(
DB_SUCCESS
);
}
if
(
!
page_is_leaf
(
block
->
frame
))
{
return
(
DB_SUCCESS
);
}
return
(
update_records
(
block
));
}
...
...
storage/innobase/row/row0log.cc
View file @
15ec8c2f
/*****************************************************************************
Copyright (c) 2011, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2011, 201
8
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
...
...
@@ -2724,7 +2724,15 @@ row_log_table_apply_ops(
while
(
!
trx_is_interrupted
(
trx
))
{
mrec
=
next_mrec
;
ut_ad
(
mrec
<
mrec_end
);
ut_ad
(
mrec
<=
mrec_end
);
if
(
mrec
==
mrec_end
)
{
/* We are at the end of the log.
Mark the replay all_done. */
if
(
has_index_lock
)
{
goto
all_done
;
}
}
if
(
!
has_index_lock
)
{
/* We are applying operations from a different
...
...
storage/innobase/row/row0mysql.cc
View file @
15ec8c2f
/*****************************************************************************
Copyright (c) 2000, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 201
8
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
...
...
@@ -1442,8 +1442,7 @@ row_insert_for_mysql(
doc_ids difference should not exceed
FTS_DOC_ID_MAX_STEP value. */
if
(
next_doc_id
>
1
&&
doc_id
-
next_doc_id
>=
FTS_DOC_ID_MAX_STEP
)
{
if
(
doc_id
-
next_doc_id
>=
FTS_DOC_ID_MAX_STEP
)
{
fprintf
(
stderr
,
"InnoDB: Doc ID "
UINT64PF
" is too"
" big. Its difference with largest"
...
...
@@ -5143,7 +5142,8 @@ row_rename_table_for_mysql(
}
}
if
(
dict_table_has_fts_index
(
table
)
if
((
dict_table_has_fts_index
(
table
)
||
DICT_TF2_FLAG_IS_SET
(
table
,
DICT_TF2_FTS_HAS_DOC_ID
))
&&
!
dict_tables_have_same_db
(
old_name
,
new_name
))
{
err
=
fts_rename_aux_tables
(
table
,
new_name
,
trx
);
if
(
err
!=
DB_TABLE_NOT_FOUND
)
{
...
...
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