mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint client/mysqltest.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged sql/mysql_priv.h: Auto merged
This commit is contained in:
@ -100,15 +100,15 @@ install-data-local:
|
||||
uninstall-local:
|
||||
@RM@ -f -r $(DESTDIR)$(testdir)
|
||||
|
||||
std_data/client-key.pem:
|
||||
std_data/client-key.pem: $(top_srcdir)/SSL/$(@F)
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/client-cert.pem:
|
||||
std_data/client-cert.pem: $(top_srcdir)/SSL/$(@F)
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/cacert.pem:
|
||||
std_data/cacert.pem: $(top_srcdir)/SSL/$(@F)
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/server-cert.pem:
|
||||
std_data/server-cert.pem: $(top_srcdir)/SSL/$(@F)
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/server-key.pem:
|
||||
std_data/server-key.pem: $(top_srcdir)/SSL/$(@F)
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
|
||||
SUFFIXES = .sh
|
||||
|
@ -134,7 +134,6 @@ our $glob_win32= 0; # OS and native Win32 executables
|
||||
our $glob_win32_perl= 0; # ActiveState Win32 Perl
|
||||
our $glob_cygwin_perl= 0; # Cygwin Perl
|
||||
our $glob_cygwin_shell= undef;
|
||||
our $glob_use_libtool= 1;
|
||||
our $glob_mysql_test_dir= undef;
|
||||
our $glob_mysql_bench_dir= undef;
|
||||
our $glob_hostname= undef;
|
||||
@ -189,6 +188,7 @@ our $exe_slave_mysqld;
|
||||
our $exe_im;
|
||||
our $exe_my_print_defaults;
|
||||
our $lib_udf_example;
|
||||
our $exe_libtool;
|
||||
|
||||
our $opt_bench= 0;
|
||||
our $opt_small_bench= 0;
|
||||
@ -376,7 +376,6 @@ sub main () {
|
||||
|
||||
check_ndbcluster_support(); # We check whether to actually use it later
|
||||
check_ssl_support();
|
||||
check_running_as_root();
|
||||
|
||||
environment_setup();
|
||||
signal_setup();
|
||||
@ -443,12 +442,6 @@ sub initial_setup () {
|
||||
$glob_cygwin_perl= ($^O eq "cygwin");
|
||||
$glob_win32= ($glob_win32_perl or $glob_cygwin_perl);
|
||||
|
||||
# Use libtool on all platforms except windows
|
||||
if ( $glob_win32 )
|
||||
{
|
||||
$glob_use_libtool= 0;
|
||||
}
|
||||
|
||||
# We require that we are in the "mysql-test" directory
|
||||
# to run mysql-test-run
|
||||
|
||||
@ -1000,6 +993,21 @@ sub snapshot_setup () {
|
||||
|
||||
sub executable_setup () {
|
||||
|
||||
#
|
||||
# Check if libtool is available in this distribution/clone
|
||||
# we need it when valgrinding or debugging non installed binary
|
||||
# Otherwise valgrind will valgrind the libtool wrapper or bash
|
||||
# and gdb will not find the real executable to debug
|
||||
#
|
||||
if ( -x "../libtool")
|
||||
{
|
||||
$exe_libtool= "../libtool";
|
||||
if ($opt_valgrind or $glob_debugger)
|
||||
{
|
||||
mtr_report("Using \"$exe_libtool\" when running valgrind or debugger");
|
||||
}
|
||||
}
|
||||
|
||||
if ( $opt_source_dist )
|
||||
{
|
||||
if ( $glob_win32 )
|
||||
@ -1336,7 +1344,7 @@ sub kill_and_cleanup () {
|
||||
sub check_running_as_root () {
|
||||
# Check if running as root
|
||||
# i.e a file can be read regardless what mode we set it to
|
||||
my $test_file= "test_running_as_root.txt";
|
||||
my $test_file= "$opt_vardir/test_running_as_root.txt";
|
||||
mtr_tofile($test_file, "MySQL");
|
||||
chmod(oct("0000"), $test_file);
|
||||
|
||||
@ -1653,6 +1661,7 @@ sub initialize_servers () {
|
||||
save_installed_db();
|
||||
}
|
||||
}
|
||||
check_running_as_root();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2625,6 +2634,15 @@ sub mysqld_start ($$$$$) {
|
||||
$exe= undef;
|
||||
}
|
||||
|
||||
if ($exe_libtool and $opt_valgrind)
|
||||
{
|
||||
# Add "libtool --mode-execute"
|
||||
# if running in valgrind(to avoid valgrinding bash)
|
||||
unshift(@$args, "--mode=execute", $exe);
|
||||
$exe= $exe_libtool;
|
||||
}
|
||||
|
||||
|
||||
if ( $type eq 'master' )
|
||||
{
|
||||
if ( ! defined $exe or
|
||||
@ -3122,12 +3140,12 @@ sub run_mysqltest ($) {
|
||||
debugger_arguments(\$args, \$exe, "client");
|
||||
}
|
||||
|
||||
if ($glob_use_libtool and $opt_valgrind)
|
||||
if ($exe_libtool and $opt_valgrind)
|
||||
{
|
||||
# Add "libtool --mode-execute" before the test to execute
|
||||
# if running in valgrind(to avoid valgrinding bash)
|
||||
unshift(@$args, "--mode=execute", $exe);
|
||||
$exe= "libtool";
|
||||
$exe= $exe_libtool;
|
||||
}
|
||||
|
||||
if ( $opt_check_testcases )
|
||||
@ -3197,9 +3215,9 @@ sub gdb_arguments {
|
||||
mtr_add_arg($$args, "$type");
|
||||
mtr_add_arg($$args, "-e");
|
||||
|
||||
if ( $glob_use_libtool )
|
||||
if ( $exe_libtool )
|
||||
{
|
||||
mtr_add_arg($$args, "libtool");
|
||||
mtr_add_arg($$args, $exe_libtool);
|
||||
mtr_add_arg($$args, "--mode=execute");
|
||||
}
|
||||
|
||||
@ -3259,9 +3277,9 @@ sub ddd_arguments {
|
||||
|
||||
my $save_exe= $$exe;
|
||||
$$args= [];
|
||||
if ( $glob_use_libtool )
|
||||
if ( $exe_libtool )
|
||||
{
|
||||
$$exe= "libtool";
|
||||
$$exe= $exe_libtool;
|
||||
mtr_add_arg($$args, "--mode=execute");
|
||||
mtr_add_arg($$args, "ddd");
|
||||
}
|
||||
@ -3282,6 +3300,8 @@ sub debugger_arguments {
|
||||
my $exe= shift;
|
||||
my $debugger= $opt_debugger || $opt_client_debugger;
|
||||
|
||||
# FIXME Need to change the below "eq"'s to
|
||||
# "case unsensitive string contains"
|
||||
if ( $debugger eq "vcexpress" or $debugger eq "vc")
|
||||
{
|
||||
# vc[express] /debugexe exe arg1 .. argn
|
||||
|
@ -1083,11 +1083,6 @@ DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION func1;
|
||||
DROP FUNCTION func2;
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(a int);
|
||||
select table_schema from information_schema.tables where table_schema='mysqltest';
|
||||
table_schema
|
||||
drop database mysqltest;
|
||||
select column_type, group_concat(table_schema, '.', table_name), count(*) as num
|
||||
from information_schema.columns where
|
||||
table_schema='information_schema' and
|
||||
|
5
mysql-test/r/information_schema_chmod.result
Normal file
5
mysql-test/r/information_schema_chmod.result
Normal file
@ -0,0 +1,5 @@
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(a int);
|
||||
select table_schema from information_schema.tables where table_schema='mysqltest';
|
||||
table_schema
|
||||
drop database mysqltest;
|
@ -3,8 +3,8 @@ create table t1(f1 int);
|
||||
insert into t1 values (5);
|
||||
grant select on test.* to ssl_user1@localhost require SSL;
|
||||
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
flush privileges;
|
||||
SHOW STATUS LIKE 'Ssl_cipher';
|
||||
Variable_name Value
|
||||
@ -41,3 +41,10 @@ ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1
|
||||
drop user ssl_user1@localhost, ssl_user2@localhost,
|
||||
ssl_user3@localhost, ssl_user4@localhost;
|
||||
drop table t1;
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
Error when connection to server using SSL:Unable to get private key from ''
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
Error when connection to server using SSL:Unable to get certificate from ''
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
|
53
mysql-test/std_data/untrusted-cacert.pem
Normal file
53
mysql-test/std_data/untrusted-cacert.pem
Normal file
@ -0,0 +1,53 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 0 (0x0)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Jan 18 20:12:32 2005 GMT
|
||||
Not After : Oct 15 20:12:32 2007 GMT
|
||||
Subject: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (512 bit)
|
||||
Modulus (512 bit):
|
||||
00:cf:2b:14:00:b0:3c:df:6f:9e:91:40:ec:c8:f6:
|
||||
90:b2:5b:b4:70:80:a5:a4:0a:73:c7:44:f3:2a:26:
|
||||
c4:2f:f1:3a:f1:c3:c4:ac:fc:c3:d2:c3:bf:f5:d7:
|
||||
6a:38:42:ad:22:ab:c8:c4:4b:4c:1d:16:af:05:34:
|
||||
7d:79:97:5e:e1
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84
|
||||
DirName:/C=US/ST=Oregon/L=Portland/O=sawtooth/CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com
|
||||
serial:00
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
27:f7:3d:fb:39:6f:73:a4:86:f3:a0:48:22:60:84:e9:5c:3d:
|
||||
28:36:05:16:44:98:07:87:e1:5d:b5:f3:a7:bc:33:5f:f4:29:
|
||||
a9:5f:87:33:df:e6:8e:bd:e2:f3:0a:c8:00:69:ae:3d:41:47:
|
||||
03:ea:0b:4c:67:45:4b:ab:f3:39
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC7zCCApmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiTELMAkGA1UEBhMCVVMx
|
||||
DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxETAPBgNVBAoTCHNh
|
||||
d3Rvb3RoMSQwIgYDVQQDExt3d3cuc2F3dG9vdGgtY29uc3VsdGluZy5jb20xHTAb
|
||||
BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDExODIwMTIzMloXDTA3
|
||||
MTAxNTIwMTIzMlowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
|
||||
BgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290aDEkMCIGA1UEAxMbd3d3
|
||||
LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlh
|
||||
c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDPKxQAsDzfb56RQOzI9pCy
|
||||
W7RwgKWkCnPHRPMqJsQv8Trxw8Ss/MPSw7/112o4Qq0iq8jES0wdFq8FNH15l17h
|
||||
AgMBAAGjgekwgeYwHQYDVR0OBBYEFMsPH+midnHJ5ugjpsEYt8xEz7mEMIG2BgNV
|
||||
HSMEga4wgauAFMsPH+midnHJ5ugjpsEYt8xEz7mEoYGPpIGMMIGJMQswCQYDVQQG
|
||||
EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDERMA8GA1UE
|
||||
ChMIc2F3dG9vdGgxJDAiBgNVBAMTG3d3dy5zYXd0b290aC1jb25zdWx0aW5nLmNv
|
||||
bTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb22CAQAwDAYDVR0TBAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQQFAANBACf3Pfs5b3OkhvOgSCJghOlcPSg2BRZEmAeH4V21
|
||||
86e8M1/0KalfhzPf5o694vMKyABprj1BRwPqC0xnRUur8zk=
|
||||
-----END CERTIFICATE-----
|
@ -11,4 +11,3 @@
|
||||
##############################################################################
|
||||
|
||||
ndb_load : Bug#17233
|
||||
udf : Not yet
|
||||
|
@ -793,15 +793,6 @@ DROP VIEW v1;
|
||||
DROP FUNCTION func1;
|
||||
DROP FUNCTION func2;
|
||||
|
||||
#
|
||||
# Bug #15851 Unlistable directories yield no info from information_schema
|
||||
#
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(a int);
|
||||
--exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest
|
||||
select table_schema from information_schema.tables where table_schema='mysqltest';
|
||||
--exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest
|
||||
drop database mysqltest;
|
||||
|
||||
#
|
||||
# Bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
|
||||
|
20
mysql-test/t/information_schema_chmod.test
Normal file
20
mysql-test/t/information_schema_chmod.test
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# Due to "Bug#18474 Unlistable directories yield no info from
|
||||
# information_schema, part2" this test can't be run on Window with our
|
||||
# current test framework. When "chmod -r" is done within cygwin the
|
||||
# MySQL Server can still read the directory.
|
||||
# Manual testing shows the functionalty to skip unlistable directories
|
||||
# works on windows
|
||||
#
|
||||
--source include/not_windows.inc
|
||||
|
||||
|
||||
#
|
||||
# Bug #15851 Unlistable directories yield no info from information_schema
|
||||
#
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(a int);
|
||||
--exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest
|
||||
select table_schema from information_schema.tables where table_schema='mysqltest';
|
||||
--exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest
|
||||
drop database mysqltest;
|
@ -10,8 +10,8 @@ insert into t1 values (5);
|
||||
|
||||
grant select on test.* to ssl_user1@localhost require SSL;
|
||||
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
flush privileges;
|
||||
|
||||
connect (con1,localhost,ssl_user1,,,,,SSL);
|
||||
@ -54,3 +54,41 @@ ssl_user3@localhost, ssl_user4@localhost;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a different cacert
|
||||
#
|
||||
--exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-ca=$MYSQL_TEST_DIR/std_data/untrusted-cacert.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a blank ca
|
||||
#
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a nonexistent ca file
|
||||
#
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a blank client-key
|
||||
#
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-key= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a blank client-cert
|
||||
#
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user