mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
2ee21c9c46
client/mysqltest.c: Don't write error message to log if there is more than one possible error message include/mysqld_error.h: Made error messages more general libmysqld/Makefile.am: md5 is now in mysys mysql-test/include/have_isam.inc: Update to new result format mysql-test/include/not_embedded.inc: Update to new result format mysql-test/mysql-test-run.sh: Update to new result format mysql-test/r/auto_increment.result: Update to new result format mysql-test/r/count_distinct2.result: Update to new result format mysql-test/r/create.result: Update to new result format mysql-test/r/func_system.result: Update to new result format mysql-test/r/isam.result: Update to new result format mysql-test/r/lock.result: Update to new result format mysql-test/r/lock_multi.result: Update to new result format mysql-test/r/rename.result: Update to new result format mysql-test/r/rpl000001.result: Fix wrong test mysql-test/r/tablelock.result: Update to new result format mysql-test/t/rename.test: Update to new result format sql/share/czech/errmsg.txt: Made error messages more general sql/share/danish/errmsg.txt: Made error messages more general sql/share/dutch/errmsg.txt: Made error messages more general sql/share/english/errmsg.txt: Made error messages more general sql/share/estonian/errmsg.txt: Made error messages more general sql/share/french/errmsg.txt: Made error messages more general sql/share/german/errmsg.txt: Made error messages more general sql/share/greek/errmsg.txt: Made error messages more general sql/share/hungarian/errmsg.txt: Made error messages more general sql/share/italian/errmsg.txt: Made error messages more general sql/share/japanese/errmsg.txt: Made error messages more general sql/share/korean/errmsg.txt: Made error messages more general sql/share/norwegian-ny/errmsg.txt: Made error messages more general sql/share/norwegian/errmsg.txt: Made error messages more general sql/share/polish/errmsg.txt: Made error messages more general sql/share/portuguese/errmsg.txt: Made error messages more general sql/share/romanian/errmsg.txt: Made error messages more general sql/share/russian/errmsg.txt: Made error messages more general sql/share/slovak/errmsg.txt: Made error messages more general sql/share/spanish/errmsg.txt: Made error messages more general sql/share/swedish/errmsg.txt: Made error messages more general sql/share/ukrainian/errmsg.txt: Made error messages more general sql/sql_lex.cc: We can't remove lex->thd because sql_yacc uses it. sql/sql_lex.h: We can't remove lex->thd because sql_yacc uses it. sql/sql_yacc.yy: Cleanup support-files/mysql.spec.sh: Create MySQL-embedded rpm tools/mysqlmanager.c: Fix bug in merge
129 lines
2.2 KiB
Text
129 lines
2.2 KiB
Text
drop table if exists t1;
|
|
create table t1(n1 int, n2 int, s char(20), vs varchar(20), t text);
|
|
insert into t1 values (1,11, 'one','eleven', 'eleven'),
|
|
(1,11, 'one','eleven', 'eleven'),
|
|
(2,11, 'two','eleven', 'eleven'),
|
|
(2,12, 'two','twevle', 'twelve'),
|
|
(2,13, 'two','thirteen', 'foo'),
|
|
(2,13, 'two','thirteen', 'foo'),
|
|
(2,13, 'two','thirteen', 'bar'),
|
|
(NULL,13, 'two','thirteen', 'bar'),
|
|
(2,NULL, 'two','thirteen', 'bar'),
|
|
(2,13, NULL,'thirteen', 'bar'),
|
|
(2,13, 'two',NULL, 'bar'),
|
|
(2,13, 'two','thirteen', NULL);
|
|
select distinct n1 from t1;
|
|
n1
|
|
1
|
|
2
|
|
NULL
|
|
select count(distinct n1) from t1;
|
|
count(distinct n1)
|
|
2
|
|
select distinct n2 from t1;
|
|
n2
|
|
11
|
|
12
|
|
13
|
|
NULL
|
|
select count(distinct n2) from t1;
|
|
count(distinct n2)
|
|
3
|
|
select distinct s from t1;
|
|
s
|
|
one
|
|
two
|
|
NULL
|
|
select count(distinct s) from t1;
|
|
count(distinct s)
|
|
2
|
|
select distinct vs from t1;
|
|
vs
|
|
eleven
|
|
twevle
|
|
thirteen
|
|
NULL
|
|
select count(distinct vs) from t1;
|
|
count(distinct vs)
|
|
3
|
|
select distinct t from t1;
|
|
t
|
|
eleven
|
|
twelve
|
|
foo
|
|
bar
|
|
NULL
|
|
select count(distinct t) from t1;
|
|
count(distinct t)
|
|
4
|
|
select distinct n1,n2 from t1;
|
|
n1 n2
|
|
1 11
|
|
2 11
|
|
2 12
|
|
2 13
|
|
NULL 13
|
|
2 NULL
|
|
select count(distinct n1,n2) from t1;
|
|
count(distinct n1,n2)
|
|
4
|
|
select distinct n1,s from t1;
|
|
n1 s
|
|
1 one
|
|
2 two
|
|
NULL two
|
|
2 NULL
|
|
select count(distinct n1,s) from t1;
|
|
count(distinct n1,s)
|
|
2
|
|
select distinct s,n1,vs from t1;
|
|
s n1 vs
|
|
one 1 eleven
|
|
two 2 eleven
|
|
two 2 twevle
|
|
two 2 thirteen
|
|
two NULL thirteen
|
|
NULL 2 thirteen
|
|
two 2 NULL
|
|
select count(distinct s,n1,vs) from t1;
|
|
count(distinct s,n1,vs)
|
|
4
|
|
select distinct s,t from t1;
|
|
s t
|
|
one eleven
|
|
two eleven
|
|
two twelve
|
|
two foo
|
|
two bar
|
|
NULL bar
|
|
two NULL
|
|
select count(distinct s,t) from t1;
|
|
count(distinct s,t)
|
|
5
|
|
select count(distinct n1), count(distinct n2) from t1;
|
|
count(distinct n1) count(distinct n2)
|
|
2 3
|
|
select count(distinct n2), n1 from t1 group by n1;
|
|
count(distinct n2) n1
|
|
1 NULL
|
|
1 1
|
|
3 2
|
|
drop table t1;
|
|
create table t1 (n int default NULL);
|
|
flush status;
|
|
select count(distinct n) from t1;
|
|
count(distinct n)
|
|
5000
|
|
show status like 'Created_tmp_disk_tables';
|
|
Variable_name Value
|
|
Created_tmp_disk_tables 1
|
|
drop table t1;
|
|
create table t1 (s text);
|
|
flush status;
|
|
select count(distinct s) from t1;
|
|
count(distinct s)
|
|
5000
|
|
show status like 'Created_tmp_disk_tables';
|
|
Variable_name Value
|
|
Created_tmp_disk_tables 1
|
|
drop table t1;
|