mariadb/mysql-test/t/connect.test
unknown c797e79b0a Merge shellback.(none):/home/msvensson/mysql/same_tools/my41-same_tools
into  shellback.(none):/home/msvensson/mysql/same_tools/my50-same_tools


mysql-test/include/ps_query.inc:
  Auto merged
mysql-test/r/check.result:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/flush.result:
  Auto merged
mysql-test/r/flush_block_commit.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/lock_multi.result:
  Auto merged
mysql-test/r/mix_innodb_myisam_binlog.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_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/r/rpl000001.result:
  Auto merged
mysql-test/r/rpl_error_ignored_table.result:
  Auto merged
mysql-test/r/rpl_master_pos_wait.result:
  Auto merged
BitKeeper/deleted/.del-rpl000018.test:
  Auto merged
BitKeeper/deleted/.del-rpl_heap.test:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/synchronization.result:
  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/rpl_flush_tables.test:
  Auto merged
mysql-test/t/rpl_trunc_temp.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
BitKeeper/deleted/.del-show_msg80.inc:
  Delete: mysql-test/include/show_msg80.inc
BitKeeper/deleted/.del-init_file.result:
  Delete: mysql-test/r/init_file.result
BitKeeper/deleted/.del-mysql_client_test.result:
  Delete: mysql-test/r/mysql_client_test.result
BitKeeper/deleted/.del-show_msg.inc:
  Delete: mysql-test/include/show_msg.inc
client/Makefile.am:
  Use local file
client/mysqltest.c:
  Use backported version of mysqltest
mysql-test/r/mysqltest.result:
  Use backported file
mysql-test/t/mysqltest.test:
  Use backported version
mysql-test/r/type_blob.result:
  Manual merge
mysql-test/t/connect.test:
  Used local version
mysql-test/t/init_file.test:
  Manual merge
mysql-test/t/mysql_client_test.test:
  Manual merge
mysql-test/t/type_blob.test:
  Manual merge
2006-10-03 16:14:23 +02:00

101 lines
3.1 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
--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