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
f18599a1
Commit
f18599a1
authored
Dec 06, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tokudb compilation warnings
5.5 patch only
parent
d1fe928c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
213 deletions
+0
-213
storage/tokudb/hatoku_cmp.cc
storage/tokudb/hatoku_cmp.cc
+0
-186
storage/tokudb/hatoku_cmp.h
storage/tokudb/hatoku_cmp.h
+0
-19
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+0
-8
No files found.
storage/tokudb/hatoku_cmp.cc
View file @
f18599a1
...
...
@@ -3140,189 +3140,3 @@ static uint32_t pack_key_from_desc(
return
(
uint32_t
)(
packed_key_pos
-
buf
);
//
}
static
bool
fields_have_same_name
(
Field
*
a
,
Field
*
b
)
{
return
strcmp
(
a
->
field_name
,
b
->
field_name
)
==
0
;
}
static
bool
fields_are_same_type
(
Field
*
a
,
Field
*
b
)
{
bool
retval
=
true
;
enum_field_types
a_mysql_type
=
a
->
real_type
();
enum_field_types
b_mysql_type
=
b
->
real_type
();
TOKU_TYPE
a_toku_type
=
mysql_to_toku_type
(
a
);
TOKU_TYPE
b_toku_type
=
mysql_to_toku_type
(
b
);
// make sure have same names
// make sure have same types
if
(
a_mysql_type
!=
b_mysql_type
)
{
retval
=
false
;
goto
cleanup
;
}
// Thanks to MariaDB 5.5, we can have two fields
// be the same MySQL type but not the same toku type,
// This is an issue introduced with MariaDB's fractional time
// implementation
if
(
a_toku_type
!=
b_toku_type
)
{
retval
=
false
;
goto
cleanup
;
}
// make sure that either both are nullable, or both not nullable
if
((
a
->
null_bit
&&
!
b
->
null_bit
)
||
(
!
a
->
null_bit
&&
b
->
null_bit
))
{
retval
=
false
;
goto
cleanup
;
}
switch
(
a_mysql_type
)
{
case
MYSQL_TYPE_TINY
:
case
MYSQL_TYPE_SHORT
:
case
MYSQL_TYPE_INT24
:
case
MYSQL_TYPE_LONG
:
case
MYSQL_TYPE_LONGLONG
:
// length, unsigned, auto increment
if
(
a
->
pack_length
()
!=
b
->
pack_length
()
||
(
a
->
flags
&
UNSIGNED_FLAG
)
!=
(
b
->
flags
&
UNSIGNED_FLAG
)
||
(
a
->
flags
&
AUTO_INCREMENT_FLAG
)
!=
(
b
->
flags
&
AUTO_INCREMENT_FLAG
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_DOUBLE
:
case
MYSQL_TYPE_FLOAT
:
// length, unsigned, auto increment
if
(
a
->
pack_length
()
!=
b
->
pack_length
()
||
(
a
->
flags
&
UNSIGNED_FLAG
)
!=
(
b
->
flags
&
UNSIGNED_FLAG
)
||
(
a
->
flags
&
AUTO_INCREMENT_FLAG
)
!=
(
b
->
flags
&
AUTO_INCREMENT_FLAG
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_NEWDECIMAL
:
// length, unsigned
if
(
a
->
pack_length
()
!=
b
->
pack_length
()
||
(
a
->
flags
&
UNSIGNED_FLAG
)
!=
(
b
->
flags
&
UNSIGNED_FLAG
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_ENUM
:
{
Field_enum
*
a_enum
=
static_cast
<
Field_enum
*>
(
a
);
if
(
!
a_enum
->
eq_def
(
b
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
}
case
MYSQL_TYPE_SET
:
{
Field_set
*
a_set
=
static_cast
<
Field_set
*>
(
a
);
if
(
!
a_set
->
eq_def
(
b
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
}
case
MYSQL_TYPE_BIT
:
// length
if
(
a
->
pack_length
()
!=
b
->
pack_length
())
{
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_DATE
:
case
MYSQL_TYPE_DATETIME
:
case
MYSQL_TYPE_YEAR
:
case
MYSQL_TYPE_NEWDATE
:
case
MYSQL_TYPE_TIME
:
case
MYSQL_TYPE_TIMESTAMP
:
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099)
case
MYSQL_TYPE_DATETIME2
:
case
MYSQL_TYPE_TIMESTAMP2
:
case
MYSQL_TYPE_TIME2
:
#endif
// length
if
(
a
->
pack_length
()
!=
b
->
pack_length
())
{
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_TINY_BLOB
:
case
MYSQL_TYPE_MEDIUM_BLOB
:
case
MYSQL_TYPE_BLOB
:
case
MYSQL_TYPE_LONG_BLOB
:
// test the charset
if
(
a
->
charset
()
->
number
!=
b
->
charset
()
->
number
)
{
retval
=
false
;
goto
cleanup
;
}
if
(
a
->
row_pack_length
()
!=
b
->
row_pack_length
())
{
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_STRING
:
if
(
a
->
pack_length
()
!=
b
->
pack_length
())
{
retval
=
false
;
goto
cleanup
;
}
// if both are binary, we know have same pack lengths,
// so we can goto end
if
(
a
->
binary
()
&&
b
->
binary
())
{
// nothing to do, we are good
}
else
if
(
!
a
->
binary
()
&&
!
b
->
binary
())
{
// test the charset
if
(
a
->
charset
()
->
number
!=
b
->
charset
()
->
number
)
{
retval
=
false
;
goto
cleanup
;
}
}
else
{
// one is binary and the other is not, so not the same
retval
=
false
;
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_VARCHAR
:
if
(
a
->
field_length
!=
b
->
field_length
)
{
retval
=
false
;
goto
cleanup
;
}
// if both are binary, we know have same pack lengths,
// so we can goto end
if
(
a
->
binary
()
&&
b
->
binary
())
{
// nothing to do, we are good
}
else
if
(
!
a
->
binary
()
&&
!
b
->
binary
())
{
// test the charset
if
(
a
->
charset
()
->
number
!=
b
->
charset
()
->
number
)
{
retval
=
false
;
goto
cleanup
;
}
}
else
{
// one is binary and the other is not, so not the same
retval
=
false
;
goto
cleanup
;
}
break
;
//
// I believe these are old types that are no longer
// in any 5.1 tables, so tokudb does not need
// to worry about them
// Putting in this assert in case I am wrong.
// Do not support geometry yet.
//
case
MYSQL_TYPE_GEOMETRY
:
case
MYSQL_TYPE_DECIMAL
:
case
MYSQL_TYPE_VAR_STRING
:
case
MYSQL_TYPE_NULL
:
assert
(
false
);
}
cleanup:
return
retval
;
}
static
bool
are_two_fields_same
(
Field
*
a
,
Field
*
b
)
{
return
fields_have_same_name
(
a
,
b
)
&&
fields_are_same_type
(
a
,
b
);
}
storage/tokudb/hatoku_cmp.h
View file @
f18599a1
...
...
@@ -208,10 +208,6 @@ static bool is_variable_field(KEY_AND_COL_INFO *kcinfo, uint field_num) {
return
kcinfo
->
field_types
[
field_num
]
==
KEY_AND_COL_INFO
::
TOKUDB_VARIABLE_FIELD
;
}
static
bool
is_blob_field
(
KEY_AND_COL_INFO
*
kcinfo
,
uint
field_num
)
{
return
kcinfo
->
field_types
[
field_num
]
==
KEY_AND_COL_INFO
::
TOKUDB_BLOB_FIELD
;
}
static
bool
field_valid_for_tokudb_table
(
Field
*
field
);
static
void
get_var_field_info
(
...
...
@@ -472,20 +468,5 @@ static uint32_t pack_key_from_desc(
const
DBT
*
pk_val
);
static
bool
fields_have_same_name
(
Field
*
a
,
Field
*
b
);
static
bool
fields_are_same_type
(
Field
*
a
,
Field
*
b
);
static
bool
are_two_fields_same
(
Field
*
a
,
Field
*
b
);
#endif
storage/tokudb/hatoku_hton.h
View file @
f18599a1
...
...
@@ -193,10 +193,6 @@ static MYSQL_THDVAR_BOOL(disable_slow_alter,
false
);
static
bool
get_disable_slow_alter
(
THD
*
thd
)
{
return
(
THDVAR
(
thd
,
disable_slow_alter
)
!=
0
);
}
static
MYSQL_THDVAR_BOOL
(
disable_hot_alter
,
0
,
"if on, hot alter table is disabled"
,
...
...
@@ -205,10 +201,6 @@ static MYSQL_THDVAR_BOOL(disable_hot_alter,
false
);
static
bool
get_disable_hot_alter
(
THD
*
thd
)
{
return
THDVAR
(
thd
,
disable_hot_alter
)
!=
0
;
}
static
MYSQL_THDVAR_BOOL
(
create_index_online
,
0
,
"if on, create index done online"
,
...
...
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