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
ef65c39a
Commit
ef65c39a
authored
May 14, 2020
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/10.2' into 10.3
parents
15fa70b8
f827ba3b
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
825 additions
and
2 deletions
+825
-2
mysql-test/main/func_math.result
mysql-test/main/func_math.result
+719
-1
mysql-test/main/func_math.test
mysql-test/main/func_math.test
+48
-1
mysql-test/suite/parts/inc/partition_auto_increment.inc
mysql-test/suite/parts/inc/partition_auto_increment.inc
+11
-0
mysql-test/suite/parts/r/partition_auto_increment_innodb.result
...test/suite/parts/r/partition_auto_increment_innodb.result
+8
-0
mysql-test/suite/parts/r/partition_auto_increment_maria.result
...-test/suite/parts/r/partition_auto_increment_maria.result
+8
-0
mysql-test/suite/parts/r/partition_auto_increment_memory.result
...test/suite/parts/r/partition_auto_increment_memory.result
+8
-0
mysql-test/suite/parts/r/partition_auto_increment_myisam.result
...test/suite/parts/r/partition_auto_increment_myisam.result
+8
-0
sql/item_func.cc
sql/item_func.cc
+9
-0
sql/table.cc
sql/table.cc
+6
-0
No files found.
mysql-test/main/func_math.result
View file @
ef65c39a
This diff is collapsed.
Click to expand it.
mysql-test/main/func_math.test
View file @
ef65c39a
...
...
@@ -716,6 +716,53 @@ SELECT -9223372036854775808 MOD 9223372036854775808;
SELECT
-
9223372036854775808
MOD
-
9223372036854775808
;
--
echo
#
--
echo
# MDEV-22503 MDB limits DECIMAL column precision to 16 doing CTAS with floor/ceil over DECIMAL(X,Y) where X > 16
--
echo
#
CREATE
TABLE
t44
(
d1
decimal
(
38
,
0
)
DEFAULT
NULL
);
INSERT
INTO
t44
VALUES
(
12345678901234567890123456789012345678
);
SELECT
FLOOR
(
d1
)
FROM
t44
;
CREATE
TABLE
t45
AS
SELECT
FLOOR
(
d1
)
FROM
t44
;
SELECT
*
FROM
t45
;
SHOW
CREATE
TABLE
t45
;
DROP
TABLE
t44
,
t45
;
DELIMITER
$$
;
CREATE
PROCEDURE
p1
(
prec
INT
,
scale
INT
)
BEGIN
DECLARE
maxval
VARCHAR
(
128
)
DEFAULT
''
;
SET
@
type
=
CONCAT
(
'DECIMAL('
,
prec
,
','
,
scale
,
')'
);
SET
@
stmt
=
CONCAT
(
'CREATE TABLE t1 (a '
,
@
type
,
',b '
,
@
type
,
'unsigned)'
);
PREPARE
stmt
FROM
@
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
SET
maxval
=
CONCAT
(
REPEAT
(
'9'
,
prec
-
scale
),
'.'
,
REPEAT
(
'9'
,
scale
));
INSERT
INTO
t1
VALUES
(
maxval
,
maxval
);
CREATE
TABLE
t2
AS
SELECT
a
,
b
,
FLOOR
(
a
)
AS
fa
,
FLOOR
(
b
)
AS
fb
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
SELECT
*
FROM
t2
;
DROP
TABLE
t1
,
t2
;
END
;
$$
CREATE
PROCEDURE
p2
(
prec
INT
)
BEGIN
DECLARE
scale
INT
DEFAULT
0
;
WHILE
scale
<
prec
AND
scale
<=
30
DO
CALL
p1
(
prec
,
scale
);
SET
scale
=
scale
+
1
;
END
WHILE
;
END
;
$$
DELIMITER
;
$$
--
vertical_results
CALL
p2
(
38
);
CALL
p2
(
30
);
--
horizontal_results
DROP
PROCEDURE
p2
;
DROP
PROCEDURE
p1
;
--
echo
#
--
echo
# End of 10.1 tests
...
...
@@ -1013,7 +1060,7 @@ DROP FUNCTION crc32_func;
PREPARE
stmt1
FROM
'SELECT CRC32(?)'
;
SET
@
val
=
'a'
;
EXECUTE
stmt1
USING
@
val
;
DEALLOCATE
PREPARE
stmt
;
DEALLOCATE
PREPARE
stmt
1
;
# Test case for checksum on contents of a file
SET
NAMES
utf8
;
...
...
mysql-test/suite/parts/inc/partition_auto_increment.inc
View file @
ef65c39a
...
...
@@ -861,6 +861,17 @@ SELECT * FROM t1;
DROP
TABLE
t1
;
}
if
(
!
$skip_update
)
{
--
echo
#
--
echo
# MDEV-19622 Assertion failures in
--
echo
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
--
echo
#
CREATE
OR
REPLACE
TABLE
t1
(
pk
INT
AUTO_INCREMENT
,
a
INT
,
KEY
(
pk
))
ENGINE
=
myisam
PARTITION
BY
HASH
(
a
);
INSERT
INTO
t1
VALUES
(
1
,
1
),(
2
,
2
);
UPDATE
t1
SET
pk
=
0
;
DROP
TABLE
t1
;
}
--
echo
##############################################################################
}
mysql-test/suite/parts/r/partition_auto_increment_innodb.result
View file @
ef65c39a
...
...
@@ -1101,4 +1101,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
##############################################################################
mysql-test/suite/parts/r/partition_auto_increment_maria.result
View file @
ef65c39a
...
...
@@ -1148,4 +1148,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
##############################################################################
mysql-test/suite/parts/r/partition_auto_increment_memory.result
View file @
ef65c39a
...
...
@@ -1129,4 +1129,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
##############################################################################
mysql-test/suite/parts/r/partition_auto_increment_myisam.result
View file @
ef65c39a
...
...
@@ -1148,4 +1148,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
##############################################################################
sql/item_func.cc
View file @
ef65c39a
...
...
@@ -2276,6 +2276,12 @@ longlong Item_func_bit_neg::val_int()
void
Item_func_int_val
::
fix_length_and_dec_int_or_decimal
()
{
/*
The INT branch of this code should be revised.
It creates too large data types, e.g.
CREATE OR REPLACE TABLE t2 AS SELECT FLOOR(9999999.999) AS fa;
results in a BININT(10) column, while INT(7) should probably be enough.
*/
ulonglong
tmp_max_length
=
(
ulonglong
)
args
[
0
]
->
max_length
-
(
args
[
0
]
->
decimals
?
args
[
0
]
->
decimals
+
1
:
0
)
+
2
;
max_length
=
tmp_max_length
>
(
ulonglong
)
UINT_MAX32
?
...
...
@@ -2290,6 +2296,9 @@ void Item_func_int_val::fix_length_and_dec_int_or_decimal()
*/
if
(
args
[
0
]
->
max_length
-
args
[
0
]
->
decimals
>=
DECIMAL_LONGLONG_DIGITS
-
2
)
{
fix_char_length
(
my_decimal_precision_to_length_no_truncation
(
args
[
0
]
->
decimal_int_part
(),
0
,
false
));
set_handler
(
&
type_handler_newdecimal
);
}
else
...
...
sql/table.cc
View file @
ef65c39a
...
...
@@ -6592,6 +6592,12 @@ void TABLE::mark_columns_needed_for_update()
}
need_signal
=
true
;
}
else
{
if
(
found_next_number_field
)
mark_auto_increment_column
();
}
if
(
file
->
ha_table_flags
()
&
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
)
{
/*
...
...
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