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
294b8c42
Commit
294b8c42
authored
Feb 14, 2019
by
Igor Babaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into bb-10.4-mdev16188
parents
98d55b13
e17fc729
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
97 deletions
+26
-97
storage/innobase/data/data0type.cc
storage/innobase/data/data0type.cc
+0
-61
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+0
-6
storage/innobase/include/data0type.h
storage/innobase/include/data0type.h
+26
-30
No files found.
storage/innobase/data/data0type.cc
View file @
294b8c42
...
...
@@ -79,67 +79,6 @@ dtype_get_at_most_n_mbchars(
return
(
data_len
);
}
/*********************************************************************//**
Checks if a data main type is a string type. Also a BLOB is considered a
string type.
@return TRUE if string type */
ibool
dtype_is_string_type
(
/*=================*/
ulint
mtype
)
/*!< in: InnoDB main data type code: DATA_CHAR, ... */
{
if
(
mtype
<=
DATA_BLOB
||
mtype
==
DATA_MYSQL
||
mtype
==
DATA_VARMYSQL
)
{
return
(
TRUE
);
}
return
(
FALSE
);
}
/*********************************************************************//**
Checks if a type is a binary string type. Note that for tables created with
< 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For
those DATA_BLOB columns this function currently returns FALSE.
@return TRUE if binary string type */
ibool
dtype_is_binary_string_type
(
/*========================*/
ulint
mtype
,
/*!< in: main data type */
ulint
prtype
)
/*!< in: precise type */
{
if
((
mtype
==
DATA_FIXBINARY
)
||
(
mtype
==
DATA_BINARY
)
||
(
mtype
==
DATA_BLOB
&&
(
prtype
&
DATA_BINARY_TYPE
)))
{
return
(
TRUE
);
}
return
(
FALSE
);
}
/*********************************************************************//**
Checks if a type is a non-binary string type. That is, dtype_is_string_type is
TRUE and dtype_is_binary_string_type is FALSE. Note that for tables created
with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
For those DATA_BLOB columns this function currently returns TRUE.
@return TRUE if non-binary string type */
ibool
dtype_is_non_binary_string_type
(
/*============================*/
ulint
mtype
,
/*!< in: main data type */
ulint
prtype
)
/*!< in: precise type */
{
if
(
dtype_is_string_type
(
mtype
)
==
TRUE
&&
dtype_is_binary_string_type
(
mtype
,
prtype
)
==
FALSE
)
{
return
(
TRUE
);
}
return
(
FALSE
);
}
/*********************************************************************//**
Validates a data type structure.
@return TRUE if ok */
...
...
storage/innobase/handler/handler0alter.cc
View file @
294b8c42
...
...
@@ -9034,9 +9034,7 @@ innobase_rename_or_enlarge_column_try(
const
Create_field
&
cf
,
bool
is_v
)
{
#ifdef UNIV_DEBUG
dict_col_t
*
col
;
#endif
/* UNIV_DEBUG */
dict_v_col_t
*
v_col
;
DBUG_ENTER
(
"innobase_rename_or_enlarge_column_try"
);
...
...
@@ -9049,13 +9047,9 @@ innobase_rename_or_enlarge_column_try(
if
(
is_v
)
{
v_col
=
dict_table_get_nth_v_col
(
user_table
,
pos
);
pos
=
dict_create_v_col_pos
(
v_col
->
v_pos
,
v_col
->
m_col
.
ind
);
#ifdef UNIV_DEBUG
col
=
&
v_col
->
m_col
;
#endif
/* UNIV_DEBUG */
}
else
{
#ifdef UNIV_DEBUG
col
=
dict_table_get_nth_col
(
user_table
,
pos
);
#endif
/* UNIV_DEBUG */
}
ulint
prtype
,
mtype
,
len
;
...
...
storage/innobase/include/data0type.h
View file @
294b8c42
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 201
8
, MariaDB Corporation.
Copyright (c) 2017, 201
9
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -262,35 +262,31 @@ dtype_get_at_most_n_mbchars(
ulint
data_len
,
/*!< in: length of str (in bytes) */
const
char
*
str
);
/*!< in: the string whose prefix
length is being determined */
/*********************************************************************//**
Checks if a data main type is a string type. Also a BLOB is considered a
string type.
@return TRUE if string type */
ibool
dtype_is_string_type
(
/*=================*/
ulint
mtype
);
/*!< in: InnoDB main data type code: DATA_CHAR, ... */
/*********************************************************************//**
Checks if a type is a binary string type. Note that for tables created with
< 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For
those DATA_BLOB columns this function currently returns FALSE.
@return TRUE if binary string type */
ibool
dtype_is_binary_string_type
(
/*========================*/
ulint
mtype
,
/*!< in: main data type */
ulint
prtype
);
/*!< in: precise type */
/*********************************************************************//**
Checks if a type is a non-binary string type. That is, dtype_is_string_type is
TRUE and dtype_is_binary_string_type is FALSE. Note that for tables created
with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
For those DATA_BLOB columns this function currently returns TRUE.
@return TRUE if non-binary string type */
ibool
dtype_is_non_binary_string_type
(
/*============================*/
ulint
mtype
,
/*!< in: main data type */
ulint
prtype
);
/*!< in: precise type */
/** @return whether main type is a string type */
inline
bool
dtype_is_string_type
(
ulint
mtype
)
{
return
mtype
<=
DATA_BLOB
||
mtype
==
DATA_MYSQL
||
mtype
==
DATA_VARMYSQL
;
}
/** @return whether a type is a binary string type */
inline
bool
dtype_is_binary_string_type
(
ulint
mtype
,
ulint
prtype
)
{
/* Note that for tables created before MySQL 4.0.14,
we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
For those DATA_BLOB columns we return false. */
return
mtype
==
DATA_FIXBINARY
||
mtype
==
DATA_BINARY
||
(
mtype
==
DATA_BLOB
&&
(
prtype
&
DATA_BINARY_TYPE
));
}
/** @return whether a type is a non-binary string type */
inline
bool
dtype_is_non_binary_string_type
(
ulint
mtype
,
ulint
prtype
)
{
return
dtype_is_string_type
(
mtype
)
&&
!
dtype_is_binary_string_type
(
mtype
,
prtype
);
}
/*********************************************************************//**
Sets a data type structure. */
UNIV_INLINE
...
...
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