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
a2dd86df
Commit
a2dd86df
authored
May 09, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: test
parent
a70a1cf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
23 deletions
+35
-23
mysql-test/main/default.result
mysql-test/main/default.result
+17
-4
mysql-test/main/default.test
mysql-test/main/default.test
+18
-19
No files found.
mysql-test/main/default.result
View file @
a2dd86df
drop table if exists t1,t2,t3,t4,t5,t6;
drop database if exists mysqltest;
set sql_mode="";
CREATE TABLE t1 (a varchar(30) binary NOT NULL DEFAULT ' ',
b varchar(1) binary NOT NULL DEFAULT ' ',
...
...
@@ -3135,7 +3133,9 @@ t3 CREATE TABLE `t3` (
`max(c)` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
#
# MDEV-11359: Implement IGNORE for bulk operation
#
create table t1 (a int primary key default 0, b int default 3);
insert into t1 values (1, ignore);
insert into t1 values (2, ignore);
...
...
@@ -3354,6 +3354,9 @@ a b
30 31
drop table t1;
set sql_mode=default;
#
# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
#
create table t1 (a int default b, b int default 4, t text);
insert t1 (b, t) values (5, '1 column is omitted');
insert t1 values (default, 5, '2 column gets DEFAULT, keyword');
...
...
@@ -3376,8 +3379,14 @@ a b t
5 5 8 reversed, also expression DEFAULT(0)+0
5 5 9 reversed, the value of the DEFAULT(a), that is b
drop table t1;
#
# MDEV-10352 Server crashes in Field::set_default on CREATE TABLE
#
create table t1 (col1 int default(-(default(col1))));
ERROR 01000: Expression for field `col1` is referring to uninitialized field `col1`
#
# MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
#
create table t1 (col int default (yearweek((exp(710)))));
ERROR 22003: DOUBLE value is out of range in 'exp(710)'
#
...
...
@@ -3422,7 +3431,9 @@ DEFAULT(a) CASE a WHEN 0 THEN 1 ELSE 2 END
NULL 2
DROP TABLE t;
DROP VIEW v;
# end of 10.2 test
#
# End of 10.2 test
#
#
# MDEV-22703 DEFAULT() on a BLOB column can overwrite the default
# record, which can cause crashes when accessing already released
...
...
@@ -3438,4 +3449,6 @@ length(DEFAULT(h))
25
INSERT INTO t1 () VALUES ();
drop table t1;
# end of 10.3 test
#
# End of 10.3 test
#
mysql-test/main/default.test
View file @
a2dd86df
--
source
include
/
have_innodb
.
inc
#
# test of already fixed bugs
#
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
;
drop
database
if
exists
mysqltest
;
#
# Bug 10838
# Insert causes warnings for no default values and corrupts tables
#
--
disable_warnings
set
sql_mode
=
""
;
CREATE
TABLE
t1
(
a
varchar
(
30
)
binary
NOT
NULL
DEFAULT
' '
,
b
varchar
(
1
)
binary
NOT
NULL
DEFAULT
' '
,
...
...
@@ -1891,7 +1885,9 @@ show create table t2;
show
create
table
t3
;
drop
table
t1
,
t2
,
t3
;
--
echo
#
--
echo
# MDEV-11359: Implement IGNORE for bulk operation
--
echo
#
create
table
t1
(
a
int
primary
key
default
0
,
b
int
default
3
);
insert
into
t1
values
(
1
,
ignore
);
insert
into
t1
values
(
2
,
ignore
);
...
...
@@ -2071,9 +2067,9 @@ select * from t1;
drop
table
t1
;
set
sql_mode
=
default
;
#
# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
#
--
echo
#
--
echo
# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
--
echo
#
create
table
t1
(
a
int
default
b
,
b
int
default
4
,
t
text
);
insert
t1
(
b
,
t
)
values
(
5
,
'1 column is omitted'
);
insert
t1
values
(
default
,
5
,
'2 column gets DEFAULT, keyword'
);
...
...
@@ -2088,15 +2084,15 @@ insert t1 (t,b,a) values ('9 reversed, the value of the DEFAULT(a), that is b',
select
*
from
t1
order
by
t
;
drop
table
t1
;
#
# MDEV-10352 Server crashes in Field::set_default on CREATE TABLE
#
--
echo
#
--
echo
# MDEV-10352 Server crashes in Field::set_default on CREATE TABLE
--
echo
#
--
error
ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create
table
t1
(
col1
int
default
(
-
(
default
(
col1
))));
#
# MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
#
--
echo
#
--
echo
# MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
--
echo
#
--
error
ER_DATA_OUT_OF_RANGE
create
table
t1
(
col
int
default
(
yearweek
((
exp
(
710
)))));
...
...
@@ -2126,7 +2122,6 @@ INSERT INTO t1 VALUES (),();
SELECT
1
FROM
t1
GROUP
BY
DEFAULT
(
pk
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
--
echo
# Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0'
...
...
@@ -2142,7 +2137,9 @@ CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
SELECT
DISTINCT
DEFAULT
(
a
),
CASE
a
WHEN
0
THEN
1
ELSE
2
END
FROM
v
GROUP
BY
a
WITH
ROLLUP
;
DROP
TABLE
t
;
DROP
VIEW
v
;
--
echo
# end of 10.2 test
--
echo
#
--
echo
# End of 10.2 test
--
echo
#
--
echo
#
--
echo
# MDEV-22703 DEFAULT() on a BLOB column can overwrite the default
...
...
@@ -2160,4 +2157,6 @@ SELECT length(DEFAULT(h)) FROM t1;
INSERT
INTO
t1
()
VALUES
();
drop
table
t1
;
--
echo
# end of 10.3 test
--
echo
#
--
echo
# End of 10.3 test
--
echo
#
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