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
f93f44e7
Commit
f93f44e7
authored
Jun 30, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix.
parent
259fdbf9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
731 additions
and
20 deletions
+731
-20
mysql-test/r/create.result
mysql-test/r/create.result
+638
-0
mysql-test/r/rpl_switch_stm_row_mixed.result
mysql-test/r/rpl_switch_stm_row_mixed.result
+2
-2
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+33
-0
mysql-test/r/type_enum.result
mysql-test/r/type_enum.result
+31
-8
mysql-test/t/type_enum.test
mysql-test/t/type_enum.test
+27
-10
No files found.
mysql-test/r/create.result
View file @
f93f44e7
This diff is collapsed.
Click to expand it.
mysql-test/r/rpl_switch_stm_row_mixed.result
View file @
f93f44e7
...
@@ -457,7 +457,7 @@ master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` (
...
@@ -457,7 +457,7 @@ master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` (
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` (
master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` (
`1` varbinary(
36
) NOT NULL DEFAULT ''
`1` varbinary(
108
) NOT NULL DEFAULT ''
)
)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
...
@@ -761,7 +761,7 @@ master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` (
...
@@ -761,7 +761,7 @@ master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` (
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` (
master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` (
`1` varbinary(
36
) NOT NULL DEFAULT ''
`1` varbinary(
108
) NOT NULL DEFAULT ''
)
)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
...
...
mysql-test/r/subselect.result
View file @
f93f44e7
...
@@ -4106,6 +4106,39 @@ d1
...
@@ -4106,6 +4106,39 @@ d1
1
1
1
1
DROP TABLE t1,t2;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INTEGER, b INTEGER);
CREATE TABLE t2 (x INTEGER);
INSERT INTO t1 VALUES (1,11), (2,22), (2,22);
INSERT INTO t2 VALUES (1), (2);
SELECT a, COUNT(b), (SELECT COUNT(b) FROM t2) FROM t1 GROUP BY a;
ERROR 21000: Subquery returns more than 1 row
SELECT a, COUNT(b), (SELECT COUNT(b)+0 FROM t2) FROM t1 GROUP BY a;
ERROR 21000: Subquery returns more than 1 row
SELECT (SELECT SUM(t1.a)/AVG(t2.x) FROM t2) FROM t1;
(SELECT SUM(t1.a)/AVG(t2.x) FROM t2)
3.3333
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1, 2), (1,3), (1,4), (2,1), (2,2);
SELECT a1.a, COUNT(*) FROM t1 a1 WHERE a1.a = 1
AND EXISTS( SELECT a2.a FROM t1 a2 WHERE a2.a = a1.a)
GROUP BY a1.a;
a COUNT(*)
1 3
DROP TABLE t1;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t2 VALUES (1),(2);
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=0) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=0)
NULL
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1;
ERROR 21000: Subquery returns more than 1 row
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=1)
3
DROP TABLE t1,t2;
End of 5.0 tests.
End of 5.0 tests.
CREATE TABLE t1 (a int, b int);
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
...
...
mysql-test/r/type_enum.result
View file @
f93f44e7
...
@@ -1753,14 +1753,6 @@ t1 CREATE TABLE `t1` (
...
@@ -1753,14 +1753,6 @@ t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL,
`f1` int(11) DEFAULT NULL,
`f2` enum('') DEFAULT NULL
`f2` enum('') DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
End of 4.1 tests
create table t1(f1 set('a','b'), index(f1));
insert into t1 values(''),(''),('a'),('b');
select * from t1 where f1='';
f1
drop table t1;
drop table t1;
create table t1(russian enum('E','F','EF','FE') NOT NULL DEFAULT'E');
create table t1(russian enum('E','F','EF','FE') NOT NULL DEFAULT'E');
show create table t1;
show create table t1;
...
@@ -1786,4 +1778,35 @@ drop table t1;
...
@@ -1786,4 +1778,35 @@ drop table t1;
create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','
create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','
!"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\','zz'));
!"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\','zz'));
ERROR 42000: Field separator argument is not what is expected; check the manual
ERROR 42000: Field separator argument is not what is expected; check the manual
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
c1 ENUM('a', '', 'b')
);
INSERT INTO t1 (c1) VALUES (0), ('a'), (''), ('b');
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
SELECT id, c1 + 0, c1 FROM t1;
id c1 + 0 c1
1 0
2 1 a
3 2
4 3 b
ALTER TABLE t1 CHANGE c1 c1 ENUM('a', '') NOT NULL;
Warnings:
Warning 1265 Data truncated for column 'c1' at row 4
SELECT id, c1 + 0, c1 FROM t1;
id c1 + 0 c1
1 0
2 1 a
3 2
4 0
DROP TABLE t1;
End of 4.1 tests
create table t1(f1 set('a','b'), index(f1));
insert into t1 values(''),(''),('a'),('b');
select * from t1 where f1='';
f1
drop table t1;
End of 5.1 tests
End of 5.1 tests
...
...
mysql-test/t/type_enum.test
View file @
f93f44e7
...
@@ -136,16 +136,6 @@ alter table t1 add f2 enum(0xFFFF);
...
@@ -136,16 +136,6 @@ alter table t1 add f2 enum(0xFFFF);
show
create
table
t1
;
show
create
table
t1
;
drop
table
t1
;
drop
table
t1
;
--
echo
End
of
4.1
tests
#
# Bug#28729: Field_enum wrongly reported an error while storing an empty string.
#
create
table
t1
(
f1
set
(
'a'
,
'b'
),
index
(
f1
));
insert
into
t1
values
(
''
),(
''
),(
'a'
),(
'b'
);
select
*
from
t1
where
f1
=
''
;
drop
table
t1
;
#
#
# Bug#24660 "enum" field type definition problem
# Bug#24660 "enum" field type definition problem
#
#
...
@@ -166,4 +156,31 @@ drop table t1;
...
@@ -166,4 +156,31 @@ drop table t1;
create
table
t1
(
exhausting_charset
enum
(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
,
'
create
table
t1
(
exhausting_charset
enum
(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
,
'
!"'
,
'#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'
,
'xx\'
,
'yy\','
zz
'));
!"'
,
'#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'
,
'xx\'
,
'yy\','
zz
'));
#
# Bug #29251: MySQL coerces special 0 enum values to normal '' value
# when ALTERing the column
#
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
c1 ENUM('
a
', '', '
b
')
);
INSERT INTO t1 (c1) VALUES (0), ('
a
'), (''), ('
b
');
SELECT id, c1 + 0, c1 FROM t1;
ALTER TABLE t1 CHANGE c1 c1 ENUM('
a
', '') NOT NULL;
SELECT id, c1 + 0, c1 FROM t1;
DROP TABLE t1;
--echo End of 4.1 tests
#
# Bug#28729: Field_enum wrongly reported an error while storing an empty string.
#
create table t1(f1 set('
a
','
b
'), index(f1));
insert into t1 values(''),(''),('
a
'),('
b
');
select * from t1 where f1='
'
;
drop
table
t1
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
...
...
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