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
a449f72a
Commit
a449f72a
authored
Sep 15, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the redundant function row_table_got_default_clust_index()
Use dict_index_is_auto_gen_clust() instead.
parent
74f677fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
35 deletions
+8
-35
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+4
-8
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+4
-2
storage/innobase/include/row0mysql.h
storage/innobase/include/row0mysql.h
+0
-9
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+0
-16
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
a449f72a
...
...
@@ -6689,11 +6689,8 @@ ha_innobase::open(const char* name, int, uint)
a row in our table. Note that MySQL may also compare two row
references for equality by doing a simple memcmp on the strings
of length ref_length! */
if
(
!
row_table_got_default_clust_index
(
ib_table
))
{
m_prebuilt
->
clust_index_was_generated
=
FALSE
;
if
(
!
(
m_prebuilt
->
clust_index_was_generated
=
dict_index_is_auto_gen_clust
(
ib_table
->
indexes
.
start
)))
{
if
(
m_primary_key
>=
MAX_KEY
)
{
ib_table
->
dict_frm_mismatch
=
DICT_FRM_NO_PK
;
...
...
@@ -6759,8 +6756,6 @@ ha_innobase::open(const char* name, int, uint)
ib_push_frm_error
(
thd
,
ib_table
,
table
,
0
,
true
);
}
m_prebuilt
->
clust_index_was_generated
=
TRUE
;
ref_length
=
DATA_ROW_ID_LEN
;
/* If we automatically created the clustered index, then
...
...
@@ -14462,7 +14457,8 @@ innobase_get_mysql_key_number_for_index(
i
++
;
}
if
(
row_table_got_default_clust_index
(
index
->
table
))
{
if
(
dict_index_is_clust
(
index
)
&&
dict_index_is_auto_gen_clust
(
index
))
{
ut_a
(
i
>
0
);
i
--
;
}
...
...
storage/innobase/handler/handler0alter.cc
View file @
a449f72a
...
...
@@ -689,7 +689,8 @@ ha_innobase::check_if_supported_inplace_alter(
/* See if MYSQL table has no pk but we do. */
if
(
UNIV_UNLIKELY
(
my_primary_key
>=
MAX_KEY
)
&&
!
row_table_got_default_clust_index
(
m_prebuilt
->
table
))
{
&&
!
dict_index_is_auto_gen_clust
(
dict_table_get_first_index
(
m_prebuilt
->
table
)))
{
ha_alter_info
->
unsupported_reason
=
innobase_get_err_msg
(
ER_PRIMARY_CANT_HAVE_NULL
);
DBUG_RETURN
(
HA_ALTER_INPLACE_NOT_SUPPORTED
);
...
...
@@ -4448,7 +4449,8 @@ prepare_inplace_alter_table_dict(
index_defs
=
innobase_create_key_defs
(
ctx
->
heap
,
ha_alter_info
,
altered_table
,
ctx
->
num_to_add_index
,
num_fts_index
,
row_table_got_default_clust_index
(
ctx
->
new_table
),
dict_index_is_auto_gen_clust
(
dict_table_get_first_index
(
ctx
->
new_table
)),
fts_doc_id_col
,
add_fts_doc_id
,
add_fts_doc_id_idx
,
old_table
);
...
...
storage/innobase/include/row0mysql.h
View file @
a449f72a
...
...
@@ -262,15 +262,6 @@ row_get_prebuilt_update_vector(
/*===========================*/
row_prebuilt_t
*
prebuilt
);
/*!< in: prebuilt struct in MySQL
handle */
/*********************************************************************//**
Checks if a table is such that we automatically created a clustered
index on it (on row id).
@return TRUE if the clustered index was generated automatically */
ibool
row_table_got_default_clust_index
(
/*==============================*/
const
dict_table_t
*
table
);
/*!< in: table */
/** Does an update or delete of a row for MySQL.
@param[in,out] prebuilt prebuilt struct in MySQL handle
@return error code or DB_SUCCESS */
...
...
storage/innobase/row/row0mysql.cc
View file @
a449f72a
...
...
@@ -2283,22 +2283,6 @@ row_unlock_for_mysql(
trx
->
op_info
=
""
;
}
/*********************************************************************//**
Checks if a table is such that we automatically created a clustered
index on it (on row id).
@return TRUE if the clustered index was generated automatically */
ibool
row_table_got_default_clust_index
(
/*==============================*/
const
dict_table_t
*
table
)
/*!< in: table */
{
const
dict_index_t
*
clust_index
;
clust_index
=
dict_table_get_first_index
(
table
);
return
(
dict_index_get_nth_col
(
clust_index
,
0
)
->
mtype
==
DATA_SYS
);
}
/*********************************************************************//**
Locks the data dictionary in shared mode from modifications, for performing
foreign key check, rollback, or other operation invisible to MySQL. */
...
...
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