Commit 1acf0e78 authored by unknown's avatar unknown

Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint

into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.1-new-maint


include/mysql_h.ic:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
vio/viossl.c:
  Auto merged
parents af47c280 b461c41c
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# #
create database mysqltest; create database mysqltest;
create table mysqltest.t1(a int); create table mysqltest.t1(a int);
--exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest chmod 0000 $MYSQLTEST_VARDIR/master-data/mysqltest;
select table_schema from information_schema.tables where table_schema='mysqltest'; select table_schema from information_schema.tables where table_schema='mysqltest';
--exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest exec chmod 0777 $MYSQLTEST_VARDIR/master-data/mysqltest;
drop database mysqltest; drop database mysqltest;
# This test should work in embedded server after mysqltest is fixed # This test should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc -- source include/not_embedded.inc
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
# ============================================================================ # ============================================================================
# #
# Test of mysqltest itself # Test of mysqltest itself
......
...@@ -20,8 +20,10 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ...@@ -20,8 +20,10 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
drop table if exists t1, t2, t3, t4; drop table if exists t1, t2, t3, t4;
--enable_warnings --enable_warnings
connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock); connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
system cat /dev/null > $MYSQLTEST_VARDIR/slave-data/master.info; # Create empty file
system chmod 000 $MYSQLTEST_VARDIR/slave-data/master.info; write_file $MYSQLTEST_VARDIR/slave-data/master.info;
EOF
chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info;
connection slave; connection slave;
--disable_warnings --disable_warnings
drop table if exists t1, t2, t3, t4; drop table if exists t1, t2, t3, t4;
...@@ -32,7 +34,7 @@ drop table if exists t1, t2, t3, t4; ...@@ -32,7 +34,7 @@ drop table if exists t1, t2, t3, t4;
--replace_result $MYSQL_TEST_DIR TESTDIR --replace_result $MYSQL_TEST_DIR TESTDIR
--error 1105,1105,29 --error 1105,1105,29
start slave; start slave;
system chmod 600 $MYSQLTEST_VARDIR/slave-data/master.info; chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info;
# It will fail again because the file is empty so the slave cannot get valuable # It will fail again because the file is empty so the slave cannot get valuable
# info about how to connect to the master from it (failure in # info about how to connect to the master from it (failure in
# init_strvar_from_file() in init_master_info()). # init_strvar_from_file() in init_master_info()).
......
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
# #
# Basic triggers test # Basic triggers test
# #
...@@ -1138,8 +1142,10 @@ select trigger_schema, trigger_name, event_object_schema, ...@@ -1138,8 +1142,10 @@ select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test'; where event_object_schema = 'test';
# Trick which makes update of second .TRN file impossible # Trick which makes update of second .TRN file impossible
system echo dummy >$MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; write_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
system chmod 000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; dummy
EOF
chmod 0000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
--error 1 --error 1
rename table t1 to t2; rename table t1 to t2;
# 't1' should be still there and triggers should work correctly # 't1' should be still there and triggers should work correctly
...@@ -1148,8 +1154,8 @@ select @a, @b; ...@@ -1148,8 +1154,8 @@ select @a, @b;
select trigger_schema, trigger_name, event_object_schema, select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test'; where event_object_schema = 'test';
system chmod 600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; chmod 0600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
system rm $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; remove_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
# Let us check that updates to .TRN files were rolled back too # Let us check that updates to .TRN files were rolled back too
drop trigger t1_bi; drop trigger t1_bi;
drop trigger t1_ai; drop trigger t1_ai;
......
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
# Initialise # Initialise
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
......
...@@ -126,12 +126,16 @@ int vio_ssl_close(Vio *vio) ...@@ -126,12 +126,16 @@ int vio_ssl_close(Vio *vio)
{ {
switch ((r= SSL_shutdown(ssl))) switch ((r= SSL_shutdown(ssl)))
{ {
case 1: /* Shutdown successful */ case 1:
/* Shutdown successful */
break;
case 0:
/*
Shutdown not yet finished - since the socket is going to
be closed there is no need to call SSL_shutdown() a second
time to wait for the other side to respond
*/
break; break;
case 0: /* Shutdown not yet finished, call it again */
if ((r= SSL_shutdown(ssl) >= 0))
break;
/* Fallthrough */
default: /* Shutdown failed */ default: /* Shutdown failed */
DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d", DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
SSL_get_error(ssl, r))); SSL_get_error(ssl, r)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment