mariadb/mysql-test/t/connect.test
unknown e8fae25e6b Merge neptunus.(none):/home/msvensson/mysql/same_tools/my50-same_tools
into  neptunus.(none):/home/msvensson/mysql/same_tools/my51-same_tools


BitKeeper/deleted/.del-mtr_stress.pl:
  Auto merged
BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
BitKeeper/deleted/.del-rpl000018.result:
  Auto merged
BitKeeper/deleted/.del-rpl000018.test:
  Auto merged
BitKeeper/deleted/.del-rpl_chain_temp_table.result:
  Auto merged
BitKeeper/deleted/.del-rpl_chain_temp_table.test:
  Auto merged
BitKeeper/deleted/.del-rpl_failsafe.result:
  Auto merged
BitKeeper/deleted/.del-rpl_failsafe.test:
  Auto merged
BitKeeper/deleted/.del-rpl_heap.result:
  Auto merged
BitKeeper/deleted/.del-rpl_heap.test:
  Auto merged
mysql-test/include/have_ndb.inc:
  Auto merged
mysql-test/include/master-slave.inc:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/csv.result:
  Auto merged
mysql-test/r/drop.result:
  Auto merged
mysql-test/r/flush_block_commit.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/grant2.result:
  Auto merged
mysql-test/r/handler_myisam.result:
  Auto merged
mysql-test/r/multi_update.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/query_cache_notembedded.result:
  Auto merged
mysql-test/r/rpl_err_ignoredtable.result:
  Auto merged
mysql-test/r/rpl_master_pos_wait.result:
  Auto merged
mysql-test/r/rpl_stm_000001.result:
  Auto merged
mysql-test/r/sp-threads.result:
  Auto merged
mysql-test/r/sp_notembedded.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/synchronization.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/t/connect.test:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
mysql-test/t/ps_grant.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_trunc_temp.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp_notembedded.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
  SCCS merged
2006-10-04 16:35:40 +02:00

105 lines
3.3 KiB
Text

# This test is to check various cases of connections
# with right and wrong password, with and without database
# Unfortunately the check is incomplete as we can't connect without database
# This test makes no sense with the embedded server
--source include/not_embedded.inc
# check that CSV engine was compiled in, as the test relies on the presence
# of the log tables (which are CSV-based). By connect mysql; show tables;
--source include/have_csv.inc
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
#connect (con1,localhost,root,,"");
#show tables;
connect (con1,localhost,root,,mysql);
show tables;
connect (con2,localhost,root,,test);
show tables;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,root,z,test2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,root,z,);
grant ALL on *.* to test@localhost identified by "gambling";
grant ALL on *.* to test@127.0.0.1 identified by "gambling";
# Now check this user with different databases
#connect (con1,localhost,test,gambling,"");
#show tables;
connect (con3,localhost,test,gambling,mysql);
show tables;
connect (con4,localhost,test,gambling,test);
show tables;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,,test2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,,"");
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,zorro,test2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,zorro,);
# check if old password version also works
update mysql.user set password=old_password("gambling2") where user=_binary"test";
flush privileges;
connect (con10,localhost,test,gambling2,);
connect (con5,localhost,test,gambling2,mysql);
connection con5;
set password="";
--error 1372
set password='gambling3';
set password=old_password('gambling3');
show tables;
connect (con6,localhost,test,gambling3,test);
show tables;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,,test2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,,);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,zorro,test2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,zorro,);
# remove user 'test' so that other tests which may use 'test'
# do not depend on this test.
delete from mysql.user where user=_binary"test";
flush privileges;
#
# Bug#12517: Clear user variables and replication events before
# closing temp tables in thread cleanup.
connect (con7,localhost,root,,test);
connection con7;
create table t1 (id integer not null auto_increment primary key);
create temporary table t2(id integer not null auto_increment primary key);
set @id := 1;
delete from t1 where id like @id;
disconnect con7;
--sleep 5
connection default;
drop table t1;
# End of 4.1 tests