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
88349678
Commit
88349678
authored
Feb 06, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge bb-10.2-ext into 10.3
parents
eda14259
560b9895
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
45 deletions
+27
-45
mysql-test/suite/sql_sequence/create.result
mysql-test/suite/sql_sequence/create.result
+7
-0
mysql-test/suite/sql_sequence/create.test
mysql-test/suite/sql_sequence/create.test
+8
-0
sql/compat56.cc
sql/compat56.cc
+1
-1
sql/field.cc
sql/field.cc
+6
-7
sql/field.h
sql/field.h
+0
-31
sql/sql_time.cc
sql/sql_time.cc
+4
-5
storage/innobase/include/dict0dict.ic
storage/innobase/include/dict0dict.ic
+1
-1
No files found.
mysql-test/suite/sql_sequence/create.result
View file @
88349678
...
...
@@ -634,3 +634,10 @@ create temporary table s (i int);
drop temporary sequence s;
ERROR 42S02: Unknown SEQUENCE: 'test.s'
drop table s;
#
# MDEV-15115 Assertion failure in CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
#
CREATE SEQUENCE seq1 ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
DROP SEQUENCE seq1;
CREATE TEMPORARY SEQUENCE seq1 ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
DROP TEMPORARY SEQUENCE seq1;
mysql-test/suite/sql_sequence/create.test
View file @
88349678
...
...
@@ -450,3 +450,11 @@ create temporary table s (i int);
--
error
ER_UNKNOWN_SEQUENCES
drop
temporary
sequence
s
;
drop
table
s
;
--
echo
#
--
echo
# MDEV-15115 Assertion failure in CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
--
echo
#
CREATE
SEQUENCE
seq1
ENGINE
=
InnoDB
ROW_FORMAT
=
REDUNDANT
;
DROP
SEQUENCE
seq1
;
CREATE
TEMPORARY
SEQUENCE
seq1
ENGINE
=
InnoDB
ROW_FORMAT
=
REDUNDANT
;
DROP
TEMPORARY
SEQUENCE
seq1
;
sql/compat56.cc
View file @
88349678
...
...
@@ -47,7 +47,7 @@ longlong TIME_to_longlong_time_packed(const MYSQL_TIME *ltime)
{
DBUG_ASSERT
(
ltime
->
year
==
0
);
DBUG_ASSERT
(
ltime
->
month
==
0
);
// Mix days with hours: "1 00:10:10" -> "24:
0
0:10"
// Mix days with hours: "1 00:10:10" -> "24:
1
0:10"
long
hms
=
((
ltime
->
day
*
24
+
ltime
->
hour
)
<<
12
)
|
(
ltime
->
minute
<<
6
)
|
ltime
->
second
;
longlong
tmp
=
MY_PACKED_TIME_MAKE
(
hms
,
ltime
->
second_part
);
...
...
sql/field.cc
View file @
88349678
...
...
@@ -5545,11 +5545,9 @@ void Field_temporal::set_warnings(Sql_condition::enum_warning_level trunc_level,
a DATE field and non-zero time part is thrown away.
*/
if
(
was_cut
&
MYSQL_TIME_WARN_TRUNCATED
)
set_datetime_warning
(
trunc_level
,
WARN_DATA_TRUNCATED
,
str
,
mysql_type_to_time_type
(
type
()),
1
);
set_datetime_warning
(
trunc_level
,
WARN_DATA_TRUNCATED
,
str
,
ts_type
,
1
);
if
(
was_cut
&
MYSQL_TIME_WARN_OUT_OF_RANGE
)
set_datetime_warning
(
ER_WARN_DATA_OUT_OF_RANGE
,
str
,
mysql_type_to_time_type
(
type
()),
1
);
set_datetime_warning
(
ER_WARN_DATA_OUT_OF_RANGE
,
str
,
ts_type
,
1
);
}
...
...
@@ -5585,14 +5583,15 @@ int Field_temporal_with_date::store_TIME_with_warning(MYSQL_TIME *ltime,
}
else
if
(
!
MYSQL_TIME_WARN_HAVE_WARNINGS
(
was_cut
)
&&
(
MYSQL_TIME_WARN_HAVE_NOTES
(
was_cut
)
||
(
mysql_type_to_time_type
(
type
()
)
==
MYSQL_TIMESTAMP_DATE
&&
(
type_handler
()
->
mysql_timestamp_type
(
)
==
MYSQL_TIMESTAMP_DATE
&&
(
ltime
->
hour
||
ltime
->
minute
||
ltime
->
second
||
ltime
->
second_part
))))
{
trunc_level
=
Sql_condition
::
WARN_LEVEL_NOTE
;
was_cut
|=
MYSQL_TIME_WARN_TRUNCATED
;
ret
=
3
;
}
set_warnings
(
trunc_level
,
str
,
was_cut
,
mysql_type_to_time_type
(
type
()));
set_warnings
(
trunc_level
,
str
,
was_cut
,
type_handler
()
->
mysql_timestamp_type
());
store_TIME
(
ltime
);
return
was_cut
?
ret
:
0
;
}
...
...
@@ -5682,7 +5681,7 @@ my_decimal *Field_temporal::val_decimal(my_decimal *d)
if
(
get_date
(
&
ltime
,
0
))
{
bzero
(
&
ltime
,
sizeof
(
ltime
));
ltime
.
time_type
=
mysql_type_to_time_type
(
type
()
);
ltime
.
time_type
=
type_handler
()
->
mysql_timestamp_type
(
);
}
return
TIME_to_my_decimal
(
&
ltime
,
d
);
}
...
...
sql/field.h
View file @
88349678
...
...
@@ -490,37 +490,6 @@ inline enum_field_types real_type_to_type(enum_field_types real_type)
}
static
inline
enum
enum_mysql_timestamp_type
mysql_type_to_time_type
(
enum
enum_field_types
mysql_type
)
{
switch
(
mysql_type
)
{
case
MYSQL_TYPE_TIME2
:
case
MYSQL_TYPE_TIME
:
return
MYSQL_TIMESTAMP_TIME
;
case
MYSQL_TYPE_TIMESTAMP2
:
case
MYSQL_TYPE_TIMESTAMP
:
case
MYSQL_TYPE_DATETIME2
:
case
MYSQL_TYPE_DATETIME
:
return
MYSQL_TIMESTAMP_DATETIME
;
case
MYSQL_TYPE_NEWDATE
:
case
MYSQL_TYPE_DATE
:
return
MYSQL_TIMESTAMP_DATE
;
default:
return
MYSQL_TIMESTAMP_ERROR
;
}
}
/**
Tests if field type is temporal, i.e. represents
DATE, TIME, DATETIME or TIMESTAMP types in SQL.
@param type Field type, as returned by field->type().
@retval true If field type is temporal
@retval false If field type is not temporal
*/
inline
bool
is_temporal_type
(
enum_field_types
type
)
{
return
mysql_type_to_time_type
(
type
)
!=
MYSQL_TIMESTAMP_ERROR
;
}
enum
enum_vcol_info_type
{
VCOL_GENERATED_VIRTUAL
,
VCOL_GENERATED_STORED
,
...
...
sql/sql_time.cc
View file @
88349678
...
...
@@ -357,19 +357,19 @@ static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part,
{
int
was_cut
;
longlong
res
;
enum_
field_types
f
_type
;
enum_
mysql_timestamp_type
ts
_type
;
bool
have_warnings
;
if
(
fuzzydate
&
TIME_TIME_ONLY
)
{
fuzzydate
=
TIME_TIME_ONLY
;
// clear other flags
f_type
=
MYSQL_TYPE
_TIME
;
ts_type
=
MYSQL_TIMESTAMP
_TIME
;
res
=
number_to_time
(
neg
,
nr
,
sec_part
,
ltime
,
&
was_cut
);
have_warnings
=
MYSQL_TIME_WARN_HAVE_WARNINGS
(
was_cut
);
}
else
{
f_type
=
MYSQL_TYPE
_DATETIME
;
ts_type
=
MYSQL_TIMESTAMP
_DATETIME
;
if
(
neg
)
{
res
=
-
1
;
...
...
@@ -385,8 +385,7 @@ static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part,
{
make_truncated_value_warning
(
current_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
str
,
res
<
0
?
MYSQL_TIMESTAMP_ERROR
:
mysql_type_to_time_type
(
f_type
),
res
<
0
?
MYSQL_TIMESTAMP_ERROR
:
ts_type
,
field_name
);
}
return
res
<
0
;
...
...
storage/innobase/include/dict0dict.ic
View file @
88349678
...
...
@@ -657,7 +657,7 @@ dict_tf_is_valid(
bit. For ROW_FORMAT=REDUNDANT, only the DATA_DIR flag
(which we cleared above) can be set. If any other flags
are set, the flags are invalid. */
return(flags == 0);
return(flags == 0
|| flags == DICT_TF_MASK_NO_ROLLBACK
);
}
return(dict_tf_is_valid_not_redundant(flags));
...
...
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