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
3629f62d
Commit
3629f62d
authored
Sep 27, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'merge/merge-innodb-5.6' into 10.0
parents
77ce4ead
094f140c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
13 deletions
+98
-13
storage/innobase/fts/fts0fts.cc
storage/innobase/fts/fts0fts.cc
+31
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+7
-2
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+6
-3
storage/innobase/handler/i_s.cc
storage/innobase/handler/i_s.cc
+2
-0
storage/innobase/include/fts0fts.h
storage/innobase/include/fts0fts.h
+10
-0
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+1
-1
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+7
-7
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+34
-0
No files found.
storage/innobase/fts/fts0fts.cc
View file @
3629f62d
...
...
@@ -108,6 +108,7 @@ UNIV_INTERN mysql_pfs_key_t fts_pll_tokenize_mutex_key;
/** variable to record innodb_fts_internal_tbl_name for information
schema table INNODB_FTS_INSERTED etc. */
UNIV_INTERN
char
*
fts_internal_tbl_name
=
NULL
;
UNIV_INTERN
char
*
fts_internal_tbl_name2
=
NULL
;
/** InnoDB default stopword list:
There are different versions of stopwords, the stop words listed
...
...
@@ -6570,6 +6571,36 @@ fts_check_corrupt_index(
return
(
0
);
}
/* Get parent table name if it's a fts aux table
@param[in] aux_table_name aux table name
@param[in] aux_table_len aux table length
@return parent table name, or NULL */
char
*
fts_get_parent_table_name
(
const
char
*
aux_table_name
,
ulint
aux_table_len
)
{
fts_aux_table_t
aux_table
;
char
*
parent_table_name
=
NULL
;
if
(
fts_is_aux_table_name
(
&
aux_table
,
aux_table_name
,
aux_table_len
))
{
dict_table_t
*
parent_table
;
parent_table
=
dict_table_open_on_id
(
aux_table
.
parent_id
,
TRUE
,
DICT_TABLE_OP_NORMAL
);
if
(
parent_table
!=
NULL
)
{
parent_table_name
=
mem_strdupl
(
parent_table
->
name
,
strlen
(
parent_table
->
name
));
dict_table_close
(
parent_table
,
TRUE
,
FALSE
);
}
}
return
(
parent_table_name
);
}
/** Check the validity of the parent table.
@param[in] aux_table auxiliary table
@return true if it is a valid table or false if it is not */
...
...
storage/innobase/handler/ha_innodb.cc
View file @
3629f62d
...
...
@@ -15010,7 +15010,12 @@ innodb_internal_table_update(
my_free
(
old
);
}
fts_internal_tbl_name
=
*
(
char
**
)
var_ptr
;
fts_internal_tbl_name2
=
*
(
char
**
)
var_ptr
;
if
(
fts_internal_tbl_name2
==
NULL
)
{
fts_internal_tbl_name
=
const_cast
<
char
*>
(
"default"
);
}
else
{
fts_internal_tbl_name
=
fts_internal_tbl_name2
;
}
}
/****************************************************************//**
...
...
@@ -16793,7 +16798,7 @@ static MYSQL_SYSVAR_BOOL(disable_sort_file_cache, srv_disable_sort_file_cache,
"Whether to disable OS system file cache for sort I/O"
,
NULL
,
NULL
,
FALSE
);
static
MYSQL_SYSVAR_STR
(
ft_aux_table
,
fts_internal_tbl_name
,
static
MYSQL_SYSVAR_STR
(
ft_aux_table
,
fts_internal_tbl_name
2
,
PLUGIN_VAR_NOCMDARG
,
"FTS internal auxiliary table to be checked"
,
innodb_internal_table_validate
,
...
...
storage/innobase/handler/handler0alter.cc
View file @
3629f62d
...
...
@@ -209,7 +209,10 @@ innobase_need_rebuild(
const
Alter_inplace_info
*
ha_alter_info
,
const
TABLE
*
altered_table
)
{
if
(
ha_alter_info
->
handler_flags
Alter_inplace_info
::
HA_ALTER_FLAGS
alter_inplace_flags
=
ha_alter_info
->
handler_flags
&
~
(
INNOBASE_INPLACE_IGNORE
);
if
(
alter_inplace_flags
==
Alter_inplace_info
::
CHANGE_CREATE_OPTION
&&
!
(
ha_alter_info
->
create_info
->
used_fields
&
(
HA_CREATE_USED_ROW_FORMAT
...
...
@@ -3933,7 +3936,7 @@ err_exit:
}
if
(
!
(
ha_alter_info
->
handler_flags
&
INNOBASE_ALTER_DATA
)
||
(
ha_alter_info
->
handler_flags
||
(
(
ha_alter_info
->
handler_flags
&
~
INNOBASE_INPLACE_IGNORE
)
==
Alter_inplace_info
::
CHANGE_CREATE_OPTION
&&
!
innobase_need_rebuild
(
ha_alter_info
,
table
)))
{
...
...
@@ -4107,7 +4110,7 @@ ok_exit:
DBUG_RETURN
(
false
);
}
if
(
ha_alter_info
->
handler_flags
if
(
(
ha_alter_info
->
handler_flags
&
~
INNOBASE_INPLACE_IGNORE
)
==
Alter_inplace_info
::
CHANGE_CREATE_OPTION
&&
!
innobase_need_rebuild
(
ha_alter_info
,
table
))
{
goto
ok_exit
;
...
...
storage/innobase/handler/i_s.cc
View file @
3629f62d
...
...
@@ -3981,6 +3981,8 @@ i_s_fts_config_fill(
DBUG_RETURN
(
0
);
}
DEBUG_SYNC_C
(
"i_s_fts_config_fille_check"
);
fields
=
table
->
field
;
/* Prevent DDL to drop fts aux tables. */
...
...
storage/innobase/include/fts0fts.h
View file @
3629f62d
...
...
@@ -375,6 +375,7 @@ extern bool fts_need_sync;
/** Variable specifying the table that has Fulltext index to display its
content through information schema table */
extern
char
*
fts_internal_tbl_name
;
extern
char
*
fts_internal_tbl_name2
;
#define fts_que_graph_free(graph) \
do { \
...
...
@@ -823,6 +824,15 @@ void
fts_drop_orphaned_tables
(
void
);
/*==========================*/
/* Get parent table name if it's a fts aux table
@param[in] aux_table_name aux table name
@param[in] aux_table_len aux table length
@return parent table name, or NULL */
char
*
fts_get_parent_table_name
(
const
char
*
aux_table_name
,
ulint
aux_table_len
);
/******************************************************************//**
Since we do a horizontal split on the index table, we need to drop
all the split tables.
...
...
storage/innobase/include/univ.i
View file @
3629f62d
...
...
@@ -44,7 +44,7 @@ Created 1/20/1994 Heikki Tuuri
#
define
INNODB_VERSION_MAJOR
5
#
define
INNODB_VERSION_MINOR
6
#
define
INNODB_VERSION_BUGFIX
3
2
#
define
INNODB_VERSION_BUGFIX
3
3
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;
...
...
storage/innobase/row/row0log.cc
View file @
3629f62d
...
...
@@ -613,7 +613,7 @@ row_log_table_delete(
&
old_pk_extra_size
);
ut_ad
(
old_pk_extra_size
<
0x100
);
mrec_size
=
4
+
old_pk_size
;
mrec_size
=
6
+
old_pk_size
;
/* Log enough prefix of the BLOB unless both the
old and new table are in COMPACT or REDUNDANT format,
...
...
@@ -643,8 +643,8 @@ row_log_table_delete(
*
b
++
=
static_cast
<
byte
>
(
old_pk_extra_size
);
/* Log the size of external prefix we saved */
mach_write_to_
2
(
b
,
ext_size
);
b
+=
2
;
mach_write_to_
4
(
b
,
ext_size
);
b
+=
4
;
rec_convert_dtuple_to_temp
(
b
+
old_pk_extra_size
,
new_index
,
...
...
@@ -2268,14 +2268,14 @@ row_log_table_apply_op(
break
;
case
ROW_T_DELETE
:
/* 1 (extra_size) +
2
(ext_size) + at least 1 (payload) */
if
(
mrec
+
4
>=
mrec_end
)
{
/* 1 (extra_size) +
4
(ext_size) + at least 1 (payload) */
if
(
mrec
+
6
>=
mrec_end
)
{
return
(
NULL
);
}
extra_size
=
*
mrec
++
;
ext_size
=
mach_read_from_
2
(
mrec
);
mrec
+=
2
;
ext_size
=
mach_read_from_
4
(
mrec
);
mrec
+=
4
;
ut_ad
(
mrec
<
mrec_end
);
/* We assume extra_size < 0x100 for the PRIMARY KEY prefix.
...
...
storage/innobase/row/row0mysql.cc
View file @
3629f62d
...
...
@@ -2715,6 +2715,10 @@ loop:
return
(
n_tables
+
n_tables_dropped
);
}
DBUG_EXECUTE_IF
(
"row_drop_tables_in_background_sleep"
,
os_thread_sleep
(
5000000
);
);
table
=
dict_table_open_on_name
(
drop
->
table_name
,
FALSE
,
FALSE
,
DICT_ERR_IGNORE_NONE
);
...
...
@@ -2725,6 +2729,16 @@ loop:
goto
already_dropped
;
}
if
(
!
table
->
to_be_dropped
)
{
/* There is a scenario: the old table is dropped
just after it's added into drop list, and new
table with the same name is created, then we try
to drop the new table in background. */
dict_table_close
(
table
,
FALSE
,
FALSE
);
goto
already_dropped
;
}
ut_a
(
!
table
->
can_be_evicted
);
dict_table_close
(
table
,
FALSE
,
FALSE
);
...
...
@@ -3992,6 +4006,13 @@ row_drop_table_for_mysql(
}
}
DBUG_EXECUTE_IF
(
"row_drop_table_add_to_background"
,
row_add_table_to_background_drop_list
(
table
->
name
);
err
=
DB_SUCCESS
;
goto
funct_exit
;
);
/* TODO: could we replace the counter n_foreign_key_checks_running
with lock checks on the table? Acquire here an exclusive lock on the
table, and rewrite lock0lock.cc and the lock wait in srv0srv.cc so that
...
...
@@ -4608,6 +4629,19 @@ loop:
row_mysql_lock_data_dictionary
(
trx
);
while
((
table_name
=
dict_get_first_table_name_in_db
(
name
)))
{
/* Drop parent table if it is a fts aux table, to
avoid accessing dropped fts aux tables in information
scheam when parent table still exists.
Note: Drop parent table will drop fts aux tables. */
char
*
parent_table_name
;
parent_table_name
=
fts_get_parent_table_name
(
table_name
,
strlen
(
table_name
));
if
(
parent_table_name
!=
NULL
)
{
mem_free
(
table_name
);
table_name
=
parent_table_name
;
}
ut_a
(
memcmp
(
table_name
,
name
,
namelen
)
==
0
);
table
=
dict_table_open_on_name
(
...
...
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