developers
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 6853 discussions

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2807)
by Michael Widenius 29 Jan '10
by Michael Widenius 29 Jan '10
29 Jan '10
#At lp:maria based on revid:monty@askmonty.org-20100128144914-lqwgn4dphka023yz
2807 Michael Widenius 2010-01-29 [merge]
Changed version number from RC to stable
Fixed bug in Yassle to get correct error messages in case of errors
Provide better error messages in case of ssl connect failure
Updated out-of-date ssl certificates to fix failing mysql-test-system (certificates now active for 10 years)
Fixed bug in query_cache that could cause asserts and hangs in DEBUG builds.
Fixed bug where one connection did not see changes done by another connection.
modified:
configure.in
extra/yassl/src/yassl_error.cpp
include/violite.h
mysql-test/mysql-test-run.pl
mysql-test/r/grant.result
mysql-test/r/openssl_1.result
mysql-test/std_data/cacert.pem
mysql-test/std_data/client-cert.pem
mysql-test/std_data/client-key.pem
mysql-test/std_data/server-cert.pem
mysql-test/std_data/server-key.pem
mysql-test/t/grant.test
mysql-test/t/openssl_1.test
mysql-test/t/query_cache_debug.test
sql-common/client.c
sql/net_serv.cc
sql/slave.cc
sql/sql_cache.cc
sql/sql_connect.cc
sql/sql_parse.cc
vio/viossl.c
per-file messages:
configure.in
Changed version number from RC to stable
extra/yassl/src/yassl_error.cpp
Fixed bug in Yassle to get correct error messages in case of errors
- 'error' is an enum that hold more error numbers than the enum was defined for
include/violite.h
Added error output string for sslaccept() and sslconnect() to get reason for connect failure
mysql-test/mysql-test-run.pl
Write failed test cases if mysql-test-run fails because of too many errors
mysql-test/r/grant.result
Update results to reflect new certificates
mysql-test/r/openssl_1.result
Update results to reflect new certificates
mysql-test/std_data/cacert.pem
Update ssl certificate
mysql-test/std_data/client-cert.pem
Update ssl certificate
mysql-test/std_data/client-key.pem
Update ssl certificate
mysql-test/std_data/server-cert.pem
Update ssl certificate
mysql-test/std_data/server-key.pem
Update ssl certificate
mysql-test/t/grant.test
Update test to reflect new certificates
mysql-test/t/openssl_1.test
Update test to reflect new certificates
mysql-test/t/query_cache_debug.test
Remove 'big_test' as test is now fast
sql-common/client.c
Give a better error message if ssl connect fails
sql/net_serv.cc
Fixed compiler warnings
sql/slave.cc
Give a better error message in logs if ssl connect fails
sql/sql_cache.cc
debug_wait_for_kill() now removes the set watch variable after kill signal
This is needed as invalidate_table() may be called twice for one query.
Ensure that net->query_cache_query is reset after query. This fixes assert in
query_cache_end_of_result() if query_cache_query holds results from previous query.
Removed DBUG_ASSERT(0), as this code can be run by query_cache_debug.test
sql/sql_connect.cc
Give a better error message if ssl connect fails
sql/sql_parse.cc
Fixed bug where one connection did not see changes done by another connection.
For statements that changes tables, close_thread_tables() MUST be called before
sending OK as a table handler may not make the changes available for other connections
before unlock_tables().
vio/viossl.c
Give a better error message if ssl connect fails
=== modified file 'configure.in'
--- a/configure.in 2010-01-17 17:22:46 +0000
+++ b/configure.in 2010-01-29 10:42:31 +0000
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
-AM_INIT_AUTOMAKE(mysql, 5.1.42-MariaDB-rc)
+AM_INIT_AUTOMAKE(mysql, 5.1.42-MariaDB)
AM_CONFIG_HEADER([include/config.h:config.h.in])
# Request support for automake silent-rules if available.
=== modified file 'extra/yassl/src/yassl_error.cpp'
--- a/extra/yassl/src/yassl_error.cpp 2008-11-18 16:45:44 +0000
+++ b/extra/yassl/src/yassl_error.cpp 2010-01-29 10:42:31 +0000
@@ -60,7 +60,7 @@ void SetErrorString(YasslError error, ch
using namespace TaoCrypt;
const int max = MAX_ERROR_SZ; // shorthand
- switch (error) {
+ switch ((int) error) {
// yaSSL proper errors
case range_error :
=== modified file 'include/violite.h'
--- a/include/violite.h 2010-01-15 15:27:55 +0000
+++ b/include/violite.h 2010-01-29 10:42:31 +0000
@@ -123,8 +123,8 @@ struct st_VioSSLFd
SSL_CTX *ssl_context;
};
-int sslaccept(struct st_VioSSLFd*, Vio *, long timeout);
-int sslconnect(struct st_VioSSLFd*, Vio *, long timeout);
+int sslaccept(struct st_VioSSLFd*, Vio *, long timeout, char *error_string);
+int sslconnect(struct st_VioSSLFd*, Vio *, long timeout, char *error_string);
struct st_VioSSLFd
*new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2010-01-27 17:41:05 +0000
+++ b/mysql-test/mysql-test-run.pl 2010-01-29 10:42:31 +0000
@@ -413,7 +413,6 @@ sub main {
# Not all tests completed, failure
mtr_report();
mtr_report("Only ", int(@$completed), " of $num_tests completed.");
- mtr_error("Not all tests completed");
}
mtr_print_line();
@@ -425,6 +424,10 @@ sub main {
mtr_report_stats($fail, $completed, $extra_warnings);
+ if ( @$completed != $num_tests)
+ {
+ mtr_error("Not all tests completed");
+ }
exit(0);
}
=== modified file 'mysql-test/r/grant.result'
--- a/mysql-test/r/grant.result 2009-10-27 10:09:36 +0000
+++ b/mysql-test/r/grant.result 2010-01-29 10:42:31 +0000
@@ -29,15 +29,15 @@ show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
-grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB";
+grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "Monty Program Ab";
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
-GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA'
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'Monty Program Ab' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA'
GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
-GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA'
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'Monty Program Ab' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA'
delete from mysql.user where user='mysqltest_1';
flush privileges;
delete from mysql.user where user='mysqltest_1';
=== modified file 'mysql-test/r/openssl_1.result'
--- a/mysql-test/r/openssl_1.result 2009-05-25 13:00:18 +0000
+++ b/mysql-test/r/openssl_1.result 2010-01-29 10:42:31 +0000
@@ -3,8 +3,10 @@ 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/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer(a)mysql.com";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer(a)mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user3@localhost require cipher
+"DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org";
+grant select on test.* to ssl_user4@localhost require cipher
+"DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org" ISSUER "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org";
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
flush privileges;
connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
@@ -44,9 +46,9 @@ ERROR 42000: DELETE command denied to us
drop user ssl_user1@localhost, ssl_user2@localhost,
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@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
+mysqltest: Could not open connection 'default': 2026 SSL error: ASN: bad other signature confirmation
+mysqltest: Could not open connection 'default': 2026 SSL error: ASN: bad other signature confirmation
+mysqltest: Could not open connection 'default': 2026 SSL error: ASN: bad other signature confirmation
SSL error: Unable to get private key from ''
mysqltest: Could not open connection 'default': 2026 SSL connection error
SSL error: Unable to get certificate from ''
=== modified file 'mysql-test/std_data/cacert.pem'
--- a/mysql-test/std_data/cacert.pem 2009-06-11 16:21:32 +0000
+++ b/mysql-test/std_data/cacert.pem 2010-01-29 10:42:31 +0000
@@ -1,17 +1,19 @@
-----BEGIN CERTIFICATE-----
-MIICrTCCAhagAwIBAgIJAJXpePU0UOTVMA0GCSqGSIb3DQEBBQUAMEQxCzAJBgNV
-BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD
-VQQKEwhNeVNRTCBBQjAeFw0wOTAxMjgxMDQ5NDZaFw0xNDAxMjcxMDQ5NDZaMEQx
-CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh
-MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-4XQHAe5R1+TXC8noZtWf+d5E0v1C59FWpn9SWEUCBjE5UiIwuJvi4Y+7xWGOXLAI
-/JzJx5gNXLBiTsE/zh0uX9fKlajLhxB0GN+QU0ZlpQ1BeYipEcNXeI/7cT499f6v
-XWabnTflivdCgHSWUOQ20/Lzs6kP6/e6OoZd/DPSjPECAwEAAaOBpjCBozAdBgNV
-HQ4EFgQU8uLqVWWkmuKsnZf1RWz294wRrd8wdAYDVR0jBG0wa4AU8uLqVWWkmuKs
-nZf1RWz294wRrd+hSKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxh
-MRAwDgYDVQQHEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAJXpePU0UOTV
-MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAMMTE5sDN+Z0ZlV7KvH3g
-6+aKvql8dTpRT3hYukeQlWua0nq74WPGVw0c4e/M/vbiMwmJcCYpB9pd4+dHqzSw
-aPyoenjY6UF8n7B4quWy3SIUk2LSHeJLW+kzJn2afN9gvipFhdVh/uU2TIyLGOur
-Z/vmJX2W7hF1uqPnbfa8Lrw=
+MIIDIjCCAougAwIBAgIJAJhuvLP+2mGwMA0GCSqGSIb3DQEBBQUAMGoxCzAJBgNV
+BAYTAkZJMRAwDgYDVQQIEwdUdXVzdWxhMRkwFwYDVQQKExBNb250eSBQcm9ncmFt
+IEFiMS4wLAYJKoZIhvcNAQkBFh9hYnN0cmFjdC5kZXZlbG9wZXJAYXNrbW9udHku
+b3JnMB4XDTEwMDEyODIxNTcyNVoXDTEwMDIyNzIxNTcyNVowajELMAkGA1UEBhMC
+RkkxEDAOBgNVBAgTB1R1dXN1bGExGTAXBgNVBAoTEE1vbnR5IFByb2dyYW0gQWIx
+LjAsBgkqhkiG9w0BCQEWH2Fic3RyYWN0LmRldmVsb3BlckBhc2ttb250eS5vcmcw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMIaY4pwbst50S32xJH3bSXhPGep
+6gx1AWwZKsHTXL3VeMO6PHmC8zu5HM0zbOcrIJcXL3YVnpmE4b9OQxIiMSx1Yd+U
+u8/sTkxgpsEKhCbIzECIwPhppyT/JP5aSXCadEvg+PSjikv8dOVkD68wVG4CcFIX
+MFttsPebBVzEokZZAgMBAAGjgc8wgcwwHQYDVR0OBBYEFOCKaNHFFPrju8AwzWxS
+f96IKfRwMIGcBgNVHSMEgZQwgZGAFOCKaNHFFPrju8AwzWxSf96IKfRwoW6kbDBq
+MQswCQYDVQQGEwJGSTEQMA4GA1UECBMHVHV1c3VsYTEZMBcGA1UEChMQTW9udHkg
+UHJvZ3JhbSBBYjEuMCwGCSqGSIb3DQEJARYfYWJzdHJhY3QuZGV2ZWxvcGVyQGFz
+a21vbnR5Lm9yZ4IJAJhuvLP+2mGwMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF
+BQADgYEAsmCX2/k9AInq2qhXtnkLip6cB0iOerLTNAzEijZc/aVf4wUjkL3cqhmC
+kSTCwAHIOxp+ICwh6ky3xghXjoI9QnPFDVkRkzPT2tV0IoBaeQuI4e0CU2EY7L3P
+XoDqp3oq1XtVcr9ZZdP68fBYUG/qcrWcXWk45ZFaBmBv3TotsGk=
-----END CERTIFICATE-----
=== modified file 'mysql-test/std_data/client-cert.pem'
--- a/mysql-test/std_data/client-cert.pem 2009-06-11 16:21:32 +0000
+++ b/mysql-test/std_data/client-cert.pem 2010-01-29 10:42:31 +0000
@@ -1,55 +1,60 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 3 (0x3)
+ Serial Number: 2 (0x2)
Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
+ Issuer: C=FI, ST=Tuusula, O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org
Validity
- Not Before: Jan 28 11:04:39 2009 GMT
- Not After : Jan 28 11:04:39 2010 GMT
- Subject: C=SE, ST=Uppsala, O=MySQL AB/emailAddress=abstract.mysql.developer(a)mysql.com
+ Not Before: Jan 28 22:01:38 2010 GMT
+ Not After : Dec 7 22:01:38 2019 GMT
+ Subject: C=FI, ST=Tuusula, O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- RSA Public Key: (512 bit)
- Modulus (512 bit):
- 00:e1:52:30:2c:d9:be:64:28:91:5d:7a:fd:d9:e9:
- 14:35:7a:d2:94:4e:91:46:e0:db:9f:6b:79:f4:4c:
- ac:6e:07:61:34:86:74:62:a7:a8:44:af:fa:87:87:
- a8:7d:42:61:ff:ab:50:d4:7b:bf:75:fa:d5:d5:b3:
- 74:fb:56:1e:37
+ RSA Public Key: (1024 bit)
+ Modulus (1024 bit):
+ 00:bd:dc:3d:f8:3c:0b:d4:d2:c0:a3:9c:34:2d:e7:
+ 11:ff:4d:43:35:17:f6:0d:91:01:92:9e:4f:4d:c0:
+ 38:d5:62:03:55:33:db:66:a2:91:d3:f2:b6:23:34:
+ 95:53:50:3d:4f:e3:0c:d7:76:fd:f6:54:64:e6:f6:
+ dc:70:74:7c:6b:74:41:59:b0:19:5d:62:90:3c:a7:
+ c8:5e:21:8f:2b:22:6b:c7:43:9b:be:79:84:60:da:
+ 16:c9:ce:ee:fd:66:cb:54:81:e2:b5:1c:cf:f9:74:
+ de:38:2b:28:d4:31:33:55:d2:30:1c:a3:e4:c2:c7:
+ 31:46:43:d5:33:3d:8a:0b:47
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 58:30:B5:9B:2C:05:94:06:BA:3D:3C:F0:B2:CD:1D:67:65:E3:7F:85
+ BE:E6:DB:19:8D:DB:72:9A:85:EE:B2:B8:5D:E7:FF:61:DF:09:08:AF
X509v3 Authority Key Identifier:
- keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF
- DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB
- serial:95:E9:78:F5:34:50:E4:D5
+ keyid:E0:8A:68:D1:C5:14:FA:E3:BB:C0:30:CD:6C:52:7F:DE:88:29:F4:70
Signature Algorithm: sha1WithRSAEncryption
- 05:19:e3:13:14:fc:c5:28:bf:69:f8:00:b3:25:cb:bd:ca:9f:
- 2f:4c:b3:a8:04:11:f0:74:27:bd:82:2c:b4:49:9b:a7:59:f0:
- f7:87:d1:e0:ba:99:a2:fe:4b:1d:10:6f:e4:a2:b3:cd:7f:8b:
- 68:31:46:ee:cd:9e:e2:47:e1:4c:fa:74:d1:e2:8b:cc:a0:4b:
- a8:24:d1:a4:c3:6b:2a:c6:28:cd:41:e0:06:48:e6:cf:f2:3c:
- ca:37:95:d7:29:64:6b:91:91:83:e7:ac:c8:0b:87:bc:da:a6:
- aa:f1:44:43:c8:74:7b:15:26:91:2e:03:c4:71:50:6c:f8:68:
- dc:8c
+ 41:95:6d:0a:a4:ee:af:68:cd:94:26:59:9a:18:b7:75:3c:c5:
+ 0f:22:d3:5c:31:9b:85:a0:93:b3:f0:50:29:ba:1e:d3:5a:43:
+ 0b:77:2d:98:87:a7:a7:39:0f:40:8d:03:d3:b3:67:43:77:bc:
+ 3c:51:c2:f9:9e:7a:2d:39:c4:5c:16:d7:70:d6:74:d1:6c:e1:
+ 6a:4d:fd:1f:10:af:64:3b:f4:64:e9:b2:b3:fb:c8:cd:c5:41:
+ cd:99:e0:ac:83:1d:81:2c:6b:99:ba:80:02:12:72:f7:3b:bb:
+ 93:72:00:da:ff:d3:87:75:d2:3a:a4:ca:4d:c1:8b:c1:21:50:
+ cb:57
-----BEGIN CERTIFICATE-----
-MIICfzCCAeigAwIBAgIBAzANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ
-MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT
-UUwgQUIwHhcNMDkwMTI4MTEwNDM5WhcNMTAwMTI4MTEwNDM5WjBlMQswCQYDVQQG
-EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxMTAvBgkq
-hkiG9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wXDAN
-BgkqhkiG9w0BAQEFAANLADBIAkEA4VIwLNm+ZCiRXXr92ekUNXrSlE6RRuDbn2t5
-9EysbgdhNIZ0YqeoRK/6h4eofUJh/6tQ1Hu/dfrV1bN0+1YeNwIDAQABo4GjMIGg
-MAkGA1UdEwQCMAAwHQYDVR0OBBYEFFgwtZssBZQGuj088LLNHWdl43+FMHQGA1Ud
-IwRtMGuAFPLi6lVlpJrirJ2X9UVs9veMEa3foUikRjBEMQswCQYDVQQGEwJTRTEQ
-MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT
-UUwgQUKCCQCV6Xj1NFDk1TANBgkqhkiG9w0BAQUFAAOBgQAFGeMTFPzFKL9p+ACz
-Jcu9yp8vTLOoBBHwdCe9giy0SZunWfD3h9Hgupmi/ksdEG/korPNf4toMUbuzZ7i
-R+FM+nTR4ovMoEuoJNGkw2sqxijNQeAGSObP8jzKN5XXKWRrkZGD56zIC4e82qaq
-8URDyHR7FSaRLgPEcVBs+GjcjA==
+MIICxTCCAi6gAwIBAgIBAjANBgkqhkiG9w0BAQUFADBqMQswCQYDVQQGEwJGSTEQ
+MA4GA1UECBMHVHV1c3VsYTEZMBcGA1UEChMQTW9udHkgUHJvZ3JhbSBBYjEuMCwG
+CSqGSIb3DQEJARYfYWJzdHJhY3QuZGV2ZWxvcGVyQGFza21vbnR5Lm9yZzAeFw0x
+MDAxMjgyMjAxMzhaFw0xOTEyMDcyMjAxMzhaMGoxCzAJBgNVBAYTAkZJMRAwDgYD
+VQQIEwdUdXVzdWxhMRkwFwYDVQQKExBNb250eSBQcm9ncmFtIEFiMS4wLAYJKoZI
+hvcNAQkBFh9hYnN0cmFjdC5kZXZlbG9wZXJAYXNrbW9udHkub3JnMIGfMA0GCSqG
+SIb3DQEBAQUAA4GNADCBiQKBgQC93D34PAvU0sCjnDQt5xH/TUM1F/YNkQGSnk9N
+wDjVYgNVM9tmopHT8rYjNJVTUD1P4wzXdv32VGTm9txwdHxrdEFZsBldYpA8p8he
+IY8rImvHQ5u+eYRg2hbJzu79ZstUgeK1HM/5dN44KyjUMTNV0jAco+TCxzFGQ9Uz
+PYoLRwIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NM
+IEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUvubbGY3bcpqF7rK4Xef/
+Yd8JCK8wHwYDVR0jBBgwFoAU4Ipo0cUU+uO7wDDNbFJ/3ogp9HAwDQYJKoZIhvcN
+AQEFBQADgYEAQZVtCqTur2jNlCZZmhi3dTzFDyLTXDGbhaCTs/BQKboe01pDC3ct
+mIenpzkPQI0D07NnQ3e8PFHC+Z56LTnEXBbXcNZ00Wzhak39HxCvZDv0ZOmys/vI
+zcVBzZngrIMdgSxrmbqAAhJy9zu7k3IA2v/Th3XSOqTKTcGLwSFQy1c=
-----END CERTIFICATE-----
=== modified file 'mysql-test/std_data/client-key.pem'
--- a/mysql-test/std_data/client-key.pem 2009-06-11 16:21:32 +0000
+++ b/mysql-test/std_data/client-key.pem 2010-01-29 10:42:31 +0000
@@ -1,9 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIBOQIBAAJBAOFSMCzZvmQokV16/dnpFDV60pROkUbg259refRMrG4HYTSGdGKn
-qESv+oeHqH1CYf+rUNR7v3X61dWzdPtWHjcCAwEAAQJAXYooM8ZlcuEgj+VKU1ee
-qyEFIMqJJxqcMk+E/nWCM96WxCP3zHNSrqNfSpI3ld7QzMwhdRz+gFLxT2gGNpIw
-MQIhAPxzM/lDihe67X3ADYtDl9ZjA8Pm430x9sXlcxI17tCZAiEA5H1SyFl4mUee
-9VnfSC2XGW7lwz72ZygfVX+b7tLWF08CIEh40gzW5MfXM+KLxdea+fXjyursV5ZT
-R6KcMiKiNQLRAiAcmHqlzFzFgisotai2Fc6VRkXHG7gmzOSvBJt1VjmpDQIge6jf
-2N7whTdvC4ferB+zUlgWQdyvx1c3T4gnt6PYdaY=
+MIICXgIBAAKBgQC93D34PAvU0sCjnDQt5xH/TUM1F/YNkQGSnk9NwDjVYgNVM9tm
+opHT8rYjNJVTUD1P4wzXdv32VGTm9txwdHxrdEFZsBldYpA8p8heIY8rImvHQ5u+
+eYRg2hbJzu79ZstUgeK1HM/5dN44KyjUMTNV0jAco+TCxzFGQ9UzPYoLRwIDAQAB
+AoGBAJa2lprPT7UJ99Ho1aL6ota/RnKHKtNqII17DgjyZis9OtgP6kJ3GrvdF6iq
+vT79my4nVrJTyxYXuGF/5U1/qqNjuPPBE1Xbu1ubQlFv8CT0kKYynQ7Z3ls8fAHC
+B3VJXnUVlG+GHtUEFFG4FQVX1fn/Sga67ioJ6ivAiBlHKaPBAkEA5f2ToWlj4u9O
+KgfRkN54wdIp4yu2c40pbhMfKGjGGsBAHk92+qSBpzEmxLcI6Ay+4/QysSR4jYmK
+jCJuxiTu1QJBANNU3Hx8Il2SF/2BqGLcIh2SHxzKQIT5wAyD2jb+P2cHvbk6pKGR
+VTmw5bibxXmYMS6J/L2zUF2xtFe+Svwz96sCQEnKYSqBqOWvyBFeLtPfPTlal8vm
+Q4SxfuBtTCrn6t+8XRYcgt0KGPsunvSwkS/6nuh+eiExxWgMACLUDVyPjv0CQQC4
+sJJc7LOv6Oy0bWr2swHRrBEqvQsz63zOszCzHPHWHirNxZV5aiT8XT/2XZRwlvRs
+gsVyGFLk/1fn0vN/g/8vAkEAxUdzUKvC1ZwjzGhgcz2bQU0tEZN4C9jBCiwOI2ud
+BpAsPG0xAGGL2+hz0B0n88XiTHobiTZ1bg4Z41i4pXx2ZA==
-----END RSA PRIVATE KEY-----
=== modified file 'mysql-test/std_data/server-cert.pem'
--- a/mysql-test/std_data/server-cert.pem 2009-06-11 16:21:32 +0000
+++ b/mysql-test/std_data/server-cert.pem 2010-01-29 10:42:31 +0000
@@ -3,53 +3,59 @@ Certificate:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
+ Issuer: C=FI, ST=Tuusula, O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org
Validity
- Not Before: Jan 28 10:55:13 2009 GMT
- Not After : Jan 28 10:55:13 2010 GMT
- Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost/emailAddress=abstract.mysql.developer(a)mysql.com
+ Not Before: Jan 28 21:59:14 2010 GMT
+ Not After : Dec 7 21:59:14 2019 GMT
+ Subject: C=FI, ST=Tuusula, O=Monty Program Ab, CN=localhost/emailAddress=abstract.developer(a)askmonty.org
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- RSA Public Key: (512 bit)
- Modulus (512 bit):
- 00:b6:8f:e5:b7:b4:86:83:13:8a:f9:bf:63:cb:64:
- 2d:b9:51:d1:de:ab:7b:45:1f:aa:b5:66:73:13:f9:
- a6:07:d5:ba:7c:fa:92:bd:37:e2:ad:87:db:3e:b6:
- 6a:12:64:f8:ee:17:e3:15:06:2f:a8:82:68:bf:57:
- 8d:c3:04:98:27
+ RSA Public Key: (1024 bit)
+ Modulus (1024 bit):
+ 00:cc:79:74:2a:14:7e:77:06:b0:ec:1b:b6:da:70:
+ 4c:4f:0e:94:04:8a:e7:69:f4:4c:9c:67:22:41:56:
+ 3a:96:53:9e:95:9d:17:55:80:41:c0:13:d6:94:0f:
+ cd:2c:51:fe:a4:6e:f2:74:d8:5d:3b:3a:80:e3:85:
+ 5b:a5:bc:7d:5c:25:55:e5:40:77:fe:f3:cb:5b:cd:
+ da:a5:f4:36:64:30:a2:a0:7f:93:b3:c4:56:75:2a:
+ c0:f7:65:2a:d7:e6:ff:88:25:03:e0:b4:40:2e:74:
+ 4c:cb:46:95:73:cb:25:5c:87:0e:ec:0f:5a:19:c2:
+ b6:dc:9e:e8:f0:30:b1:9c:99
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- D9:9A:B8:5F:22:EA:04:10:C8:25:7D:82:57:E6:2E:FD:19:29:E7:DA
+ 6D:13:3B:40:52:3C:AF:18:EA:33:D1:B7:56:21:1B:05:FE:0B:9E:38
X509v3 Authority Key Identifier:
- keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF
- DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB
- serial:95:E9:78:F5:34:50:E4:D5
+ keyid:E0:8A:68:D1:C5:14:FA:E3:BB:C0:30:CD:6C:52:7F:DE:88:29:F4:70
Signature Algorithm: sha1WithRSAEncryption
- 54:07:2d:21:0b:a5:af:3b:58:23:32:5e:56:7f:ab:58:63:48:
- 91:aa:38:90:89:16:f9:cc:bf:a4:0e:78:2b:9f:c5:1b:58:a6:
- e6:08:8f:2e:ae:97:03:21:9b:f1:cd:c0:26:8f:1d:d7:28:27:
- a0:8e:81:09:1b:1c:0f:c9:a5:41:3a:2d:44:3f:9c:fa:87:ff:
- c8:4c:2b:44:f7:1b:c1:3e:4f:01:7f:e9:26:cc:9f:1c:06:b5:
- 0b:27:d1:10:90:be:93:0c:9c:e7:b0:d1:ea:27:99:4e:06:14:
- 0c:7a:e9:c1:52:c5:33:68:bc:61:0d:db:81:3b:57:48:57:bf:
- 42:9a
+ 97:db:65:23:7f:f1:15:3c:1e:83:ac:0e:0a:50:a0:0c:22:b8:
+ 45:d4:ca:21:05:47:3b:3d:03:b5:6c:4b:8d:bb:5f:57:c3:c7:
+ 4e:71:23:cf:33:a3:7f:a0:3d:bd:58:75:b8:37:22:16:2f:e9:
+ ed:ae:9b:94:29:81:6e:34:79:cf:41:bd:3d:8d:17:d7:22:1c:
+ 1b:58:c7:0f:79:13:56:1d:e8:d8:4e:e5:07:3f:79:1b:dd:c4:
+ 06:9b:c5:b6:02:34:43:c5:bf:e5:87:ad:f1:c1:8a:f2:be:c2:
+ 00:1d:d4:27:1f:87:c8:80:31:ec:6e:97:95:b4:84:40:d1:73:
+ 42:71
-----BEGIN CERTIFICATE-----
-MIICkzCCAfygAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ
-MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT
-UUwgQUIwHhcNMDkwMTI4MTA1NTEzWhcNMTAwMTI4MTA1NTEzWjB5MQswCQYDVQQG
-EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxEjAQBgNV
-BAMTCWxvY2FsaG9zdDExMC8GCSqGSIb3DQEJARYiYWJzdHJhY3QubXlzcWwuZGV2
-ZWxvcGVyQG15c3FsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC2j+W3tIaD
-E4r5v2PLZC25UdHeq3tFH6q1ZnMT+aYH1bp8+pK9N+Kth9s+tmoSZPjuF+MVBi+o
-gmi/V43DBJgnAgMBAAGjgaMwgaAwCQYDVR0TBAIwADAdBgNVHQ4EFgQU2Zq4XyLq
-BBDIJX2CV+Yu/Rkp59owdAYDVR0jBG0wa4AU8uLqVWWkmuKsnZf1RWz294wRrd+h
-SKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdV
-cHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAJXpePU0UOTVMA0GCSqGSIb3DQEB
-BQUAA4GBAFQHLSELpa87WCMyXlZ/q1hjSJGqOJCJFvnMv6QOeCufxRtYpuYIjy6u
-lwMhm/HNwCaPHdcoJ6COgQkbHA/JpUE6LUQ/nPqH/8hMK0T3G8E+TwF/6SbMnxwG
-tQsn0RCQvpMMnOew0eonmU4GFAx66cFSxTNovGEN24E7V0hXv0Ka
+MIIC2TCCAkKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBqMQswCQYDVQQGEwJGSTEQ
+MA4GA1UECBMHVHV1c3VsYTEZMBcGA1UEChMQTW9udHkgUHJvZ3JhbSBBYjEuMCwG
+CSqGSIb3DQEJARYfYWJzdHJhY3QuZGV2ZWxvcGVyQGFza21vbnR5Lm9yZzAeFw0x
+MDAxMjgyMTU5MTRaFw0xOTEyMDcyMTU5MTRaMH4xCzAJBgNVBAYTAkZJMRAwDgYD
+VQQIEwdUdXVzdWxhMRkwFwYDVQQKExBNb250eSBQcm9ncmFtIEFiMRIwEAYDVQQD
+Ewlsb2NhbGhvc3QxLjAsBgkqhkiG9w0BCQEWH2Fic3RyYWN0LmRldmVsb3BlckBh
+c2ttb250eS5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMx5dCoUfncG
+sOwbttpwTE8OlASK52n0TJxnIkFWOpZTnpWdF1WAQcAT1pQPzSxR/qRu8nTYXTs6
+gOOFW6W8fVwlVeVAd/7zy1vN2qX0NmQwoqB/k7PEVnUqwPdlKtfm/4glA+C0QC50
+TMtGlXPLJVyHDuwPWhnCttye6PAwsZyZAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJ
+YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1Ud
+DgQWBBRtEztAUjyvGOoz0bdWIRsF/gueODAfBgNVHSMEGDAWgBTgimjRxRT647vA
+MM1sUn/eiCn0cDANBgkqhkiG9w0BAQUFAAOBgQCX22Ujf/EVPB6DrA4KUKAMIrhF
+1MohBUc7PQO1bEuNu19Xw8dOcSPPM6N/oD29WHW4NyIWL+ntrpuUKYFuNHnPQb09
+jRfXIhwbWMcPeRNWHejYTuUHP3kb3cQGm8W2AjRDxb/lh63xwYryvsIAHdQnH4fI
+gDHsbpeVtIRA0XNCcQ==
-----END CERTIFICATE-----
=== modified file 'mysql-test/std_data/server-key.pem'
--- a/mysql-test/std_data/server-key.pem 2009-06-11 16:21:32 +0000
+++ b/mysql-test/std_data/server-key.pem 2010-01-29 10:42:31 +0000
@@ -1,9 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIBOQIBAAJBALaP5be0hoMTivm/Y8tkLblR0d6re0UfqrVmcxP5pgfVunz6kr03
-4q2H2z62ahJk+O4X4xUGL6iCaL9XjcMEmCcCAwEAAQJASA5VwgNb0CKHiPm0ntOk
-hG+54SRX3DmafEy6gRjZIl/bZ/asSLhXUZ+CeohyrQh7BZgYWvykd8pRISL9eKsU
-GQIhAOXkUrOtP/EtjyqNluEqZdG+RZi/7p61JS3Ce13Myu+LAiEAy0uMlV34AJpM
-b40FPKqlHxw8DD/Dt1iKhNVAg8+LDVUCIFjv7fbJDbW2VG63/Cj8CAwOukoP5rbL
-iaicVrHBKrllAiB9+MiaXeopZXNrxDS0jQFYr8Q9yt1aJVFgUkxx4Q9HKQIgZPs0
-KlF3NNNWw78INaAEkyf0IEssnLMsuoCWw0DIOak=
+MIICXgIBAAKBgQDMeXQqFH53BrDsG7bacExPDpQEiudp9EycZyJBVjqWU56VnRdV
+gEHAE9aUD80sUf6kbvJ02F07OoDjhVulvH1cJVXlQHf+88tbzdql9DZkMKKgf5Oz
+xFZ1KsD3ZSrX5v+IJQPgtEAudEzLRpVzyyVchw7sD1oZwrbcnujwMLGcmQIDAQAB
+AoGBAMdMYkNZsmJFbVDVOobzCg3Mgc1jrmeBrOKNS8AvUe+QFXRyp3m5B102eOHb
+/PmD+hU/5qao9UZzoYkiRM/oRq45jrqJEYwWrX007bKK0F9hnErtC1ImM1nBFVhx
+6+6cr+ShUkvtj8+wJ2d5bIccUzGCUfFR5tb5BnePTXK8IVoBAkEA7WGNxHAVKgjS
+AzlpHr5fvpivA07hNVJizTwZdWGGYeETilZhkkuMRwREceeohF6ILMf0FTZdFSa/
+8EeLa3icIQJBANyDKFjynKwWy5pyRSz75mVwrEi+4eTQPsCPNWLkbpbEPwqPLYWJ
+2VSFkISXF7b7Od48JkQWgiB8/kXqMDEdsXkCQQCzZvj3ryWvoP7nhOoXXBWMPGR4
+gZLe86bMKVGsTsp7CtnzwRj4sbQQr/7yfvvzHmaYQX4M0gtDQwfolomd7YdBAkEA
+y24ETuqjNu9grf81aiaJipPDnOjcJOcovSRgr/blPxmUvv0Pld5yLNN7W5a4PgrO
+fAMpmi7ZpXcqbP17sBQgoQJAWTDFKAmfHPVdDGZuCw4yceP5d+Tv7ABglZUvpPKx
+kAvGN1WBASUuCQJDOIgzl6gvYX07S5p147i9mv7UBWOpvw==
-----END RSA PRIVATE KEY-----
=== modified file 'mysql-test/t/grant.test'
--- a/mysql-test/t/grant.test 2009-06-15 15:53:45 +0000
+++ b/mysql-test/t/grant.test 2010-01-29 10:42:31 +0000
@@ -35,7 +35,7 @@ revoke delete on mysqltest.* from mysqlt
show grants for mysqltest_1@localhost;
grant select on mysqltest.* to mysqltest_1@localhost require NONE;
show grants for mysqltest_1@localhost;
-grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB";
+grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "Monty Program Ab";
show grants for mysqltest_1@localhost;
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
=== modified file 'mysql-test/t/openssl_1.test'
--- a/mysql-test/t/openssl_1.test 2009-05-25 13:00:18 +0000
+++ b/mysql-test/t/openssl_1.test 2010-01-29 10:42:31 +0000
@@ -15,8 +15,10 @@ 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/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer(a)mysql.com";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer(a)mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user3@localhost require cipher
+"DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org";
+grant select on test.* to ssl_user4@localhost require cipher
+"DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org" ISSUER "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer(a)askmonty.org";
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
flush privileges;
=== modified file 'mysql-test/t/query_cache_debug.test'
--- a/mysql-test/t/query_cache_debug.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/query_cache_debug.test 2010-01-29 10:42:31 +0000
@@ -1,5 +1,4 @@
--source include/not_embedded.inc
---source include/big_test.inc
--source include/have_query_cache.inc
--source include/have_debug.inc
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c 2009-12-03 15:26:54 +0000
+++ b/sql-common/client.c 2010-01-29 10:42:31 +0000
@@ -1863,6 +1863,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
uint port, const char *unix_socket,ulong client_flag)
{
char buff[NAME_LEN+USERNAME_LENGTH+100];
+ char error_string[1024];
char *end,*host_info= NULL;
my_socket sock;
in_addr_t ip_addr;
@@ -2331,9 +2332,14 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
/* Connect to the server */
DBUG_PRINT("info", ("IO layer change in progress..."));
if (sslconnect(ssl_fd, mysql->net.vio,
- (long) (mysql->options.connect_timeout)))
+ (long) (mysql->options.connect_timeout),
+ error_string))
{
- set_mysql_error(mysql, CR_SSL_CONNECTION_ERROR, unknown_sqlstate);
+ set_mysql_extended_error(mysql, CR_SSL_CONNECTION_ERROR,
+ unknown_sqlstate,
+ "SSL error: %s",
+ error_string[0] ? error_string :
+ ER(CR_SSL_CONNECTION_ERROR));
goto error;
}
DBUG_PRINT("info", ("IO layer change done!"));
=== modified file 'sql/net_serv.cc'
--- a/sql/net_serv.cc 2010-01-28 14:49:14 +0000
+++ b/sql/net_serv.cc 2010-01-29 10:42:31 +0000
@@ -219,7 +219,7 @@ my_bool net_realloc(NET *net, size_t len
-1 Don't know if data is ready or not
*/
-#if !defined(EMBEDDED_LIBRARY)
+#if !defined(EMBEDDED_LIBRARY) && defined(DBUG_OFF)
static int net_data_is_ready(my_socket sd)
{
@@ -280,7 +280,7 @@ static int net_data_is_ready(my_socket s
void net_clear(NET *net, my_bool clear_buffer)
{
-#if !defined(EMBEDDED_LIBRARY)
+#if !defined(EMBEDDED_LIBRARY) && defined(DBUG_OFF)
size_t count;
int ready;
#endif
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2009-12-06 17:51:48 +0000
+++ b/sql/slave.cc 2010-01-29 10:42:31 +0000
@@ -3803,10 +3803,11 @@ static int connect_to_master(THD* thd, M
suppress_warnings= 0;
mi->report(ERROR_LEVEL, last_errno,
"error %s to master '%s@%s:%d'"
- " - retry-time: %d retries: %lu",
+ " - retry-time: %d retries: %lu message: %s",
(reconnect ? "reconnecting" : "connecting"),
mi->user, mi->host, mi->port,
- mi->connect_retry, master_retry_count);
+ mi->connect_retry, master_retry_count,
+ mysql_error(mysql));
}
/*
By default we try forever. The reason is that failure will trigger
=== modified file 'sql/sql_cache.cc'
--- a/sql/sql_cache.cc 2010-01-15 15:27:55 +0000
+++ b/sql/sql_cache.cc 2010-01-29 10:42:31 +0000
@@ -377,9 +377,11 @@ TODO list:
static void debug_wait_for_kill(const char *info)
{
- DBUG_ENTER("debug_wait_for_kill");
const char *prev_info;
THD *thd;
+ char buff[1024];
+ DBUG_ENTER("debug_wait_for_kill");
+
thd= current_thd;
prev_info= thd->proc_info;
thd->proc_info= info;
@@ -387,8 +389,16 @@ static void debug_wait_for_kill(const ch
while(!thd->killed)
my_sleep(1000);
thd->killed= THD::NOT_KILLED;
+ /*
+ Remove the set debug variable, to ensure we don't get stuck on it again
+ This is needed as for MyISAM, invalidate_table() may be called twice
+ (Once from mysql_delete() and once from mi_update_status())
+ */
+ sprintf(buff, "-d,%s", info);
+ DBUG_SET(buff);
sql_print_information("Exit debug_wait_for_kill");
thd->proc_info= prev_info;
+
DBUG_VOID_RETURN;
}
@@ -914,15 +924,18 @@ void query_cache_insert(NET *net, const
void query_cache_abort(NET *net)
{
+ THD *thd;
DBUG_ENTER("query_cache_abort");
- THD *thd= current_thd;
/* See the comment on double-check locking usage above. */
if (net->query_cache_query == 0)
DBUG_VOID_RETURN;
if (query_cache.try_lock())
+ {
+ net->query_cache_query = 0;
DBUG_VOID_RETURN;
+ }
/*
While we were waiting another thread might have changed the status
@@ -932,6 +945,7 @@ void query_cache_abort(NET *net)
net->query_cache_query);
if (query_block)
{
+ thd= current_thd;
thd_proc_info(thd, "storing result in query cache");
DUMP(&query_cache);
BLOCK_LOCK_WR(query_block);
@@ -941,6 +955,7 @@ void query_cache_abort(NET *net)
DBUG_EXECUTE("check_querycache",query_cache.check_integrity(1););
}
+ DBUG_ASSERT(!net->query_cache_query);
query_cache.unlock();
DBUG_VOID_RETURN;
}
@@ -970,8 +985,12 @@ void query_cache_end_of_result(THD *thd)
#endif
if (query_cache.try_lock())
+ {
+ thd->net.query_cache_query= 0;
DBUG_VOID_RETURN;
+ }
+ /* thd->net.query_cache_query may have changed during resize */
query_block= ((Query_cache_block*) thd->net.query_cache_query);
if (query_block)
{
@@ -997,8 +1016,8 @@ void query_cache_end_of_result(THD *thd)
to this function. In the release version that query should be ignored
and removed from QC.
*/
- DBUG_ASSERT(0);
query_cache.free_query(query_block);
+ thd->net.query_cache_query= 0;
query_cache.unlock();
DBUG_VOID_RETURN;
}
=== modified file 'sql/sql_connect.cc'
--- a/sql/sql_connect.cc 2009-12-03 11:19:05 +0000
+++ b/sql/sql_connect.cc 2010-01-29 10:42:31 +0000
@@ -798,6 +798,7 @@ static int check_connection(THD *thd)
DBUG_PRINT("info", ("client capabilities: %lu", thd->client_capabilities));
if (thd->client_capabilities & CLIENT_SSL)
{
+ char error_string[1024];
/* Do the SSL layering. */
if (!ssl_acceptor_fd)
{
@@ -806,7 +807,7 @@ static int check_connection(THD *thd)
return 1;
}
DBUG_PRINT("info", ("IO layer change in progress..."));
- if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout))
+ if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout, error_string))
{
DBUG_PRINT("error", ("Failed to accept new SSL connection"));
inc_host_errors(&thd->remote.sin_addr);
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2010-01-15 15:27:55 +0000
+++ b/sql/sql_parse.cc 2010-01-29 10:42:31 +0000
@@ -1252,12 +1252,14 @@ bool dispatch_command(enum enum_server_c
ha_maria::implicit_commit(thd, FALSE);
#endif
- net_end_statement(thd);
- query_cache_end_of_result(thd);
/*
Multiple queries exits, execute them individually
*/
close_thread_tables(thd);
+
+ net_end_statement(thd);
+ query_cache_end_of_result(thd);
+
ulong length= (ulong)(packet_end - beginning_of_next_stmt);
log_slow_statement(thd);
@@ -1645,13 +1647,22 @@ bool dispatch_command(enum enum_server_c
ha_maria::implicit_commit(thd, FALSE);
#endif
- net_end_statement(thd);
- query_cache_end_of_result(thd);
-
+ if (!(sql_command_flags[thd->lex->sql_command] & CF_CHANGES_DATA))
+ {
+ /* No changes in data; We can send ok at once to the client */
+ net_end_statement(thd);
+ query_cache_end_of_result(thd);
+ }
thd->proc_info= "closing tables";
/* Free tables */
close_thread_tables(thd);
+ if (sql_command_flags[thd->lex->sql_command] & CF_CHANGES_DATA)
+ {
+ net_end_statement(thd);
+ query_cache_end_of_result(thd);
+ }
+
log_slow_statement(thd);
thd_proc_info(thd, "cleaning up");
=== modified file 'vio/viossl.c'
--- a/vio/viossl.c 2008-02-07 08:55:49 +0000
+++ b/vio/viossl.c 2010-01-29 10:42:31 +0000
@@ -74,8 +74,11 @@ report_errors(SSL* ssl)
}
if (ssl)
- DBUG_PRINT("error", ("error: %s",
- ERR_error_string(SSL_get_error(ssl, l), buf)));
+ {
+ int error= SSL_get_error(ssl, l);
+ DBUG_PRINT("error", ("error: %s (%d)",
+ ERR_error_string(error, buf), error));
+ }
DBUG_PRINT("info", ("socket_errno: %d", socket_errno));
DBUG_VOID_RETURN;
@@ -174,16 +177,17 @@ void vio_ssl_delete(Vio *vio)
static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
- int (*connect_accept_func)(SSL*))
+ int (*connect_accept_func)(SSL*), char *error_string)
{
SSL *ssl;
my_bool unused;
my_bool was_blocking;
-
DBUG_ENTER("ssl_do");
DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx",
(long) ptr, vio->sd, (long) ptr->ssl_context));
+ error_string[0]= 0;
+
/* Set socket to blocking if not already set */
vio_blocking(vio, 1, &was_blocking);
@@ -191,6 +195,7 @@ static int ssl_do(struct st_VioSSLFd *pt
{
DBUG_PRINT("error", ("SSL_new failure"));
report_errors(ssl);
+ strmov(error_string, "SSL_new failed");
vio_blocking(vio, was_blocking, &unused);
DBUG_RETURN(1);
}
@@ -203,6 +208,7 @@ static int ssl_do(struct st_VioSSLFd *pt
{
DBUG_PRINT("error", ("SSL_connect/accept failure"));
report_errors(ssl);
+ ERR_error_string(SSL_get_error(ssl, 0), error_string);
SSL_free(ssl);
vio_blocking(vio, was_blocking, &unused);
DBUG_RETURN(1);
@@ -250,17 +256,19 @@ static int ssl_do(struct st_VioSSLFd *pt
}
-int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
+int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+ char *error_string)
{
DBUG_ENTER("sslaccept");
- DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept));
+ DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept, error_string));
}
-int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
+int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+ char *error_string)
{
DBUG_ENTER("sslconnect");
- DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect));
+ DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect, error_string));
}
1
0
Hi!
On one of the buildbot systems We get the following compiler warning:
ha_pbxt.cc:1563: warning: variable 'selfâ' might be clobbered by 'longjmp'
I have now disabled this warning in buildbot, but you may want to take
a look at this.
Regards,
Monty
2
1

[Maria-developers] [Branch ~maria-captains/maria/5.1] Rev 2806: Add support in bintar build script for OpenSolaris.
by noreplyï¼ launchpad.net 28 Jan '10
by noreplyï¼ launchpad.net 28 Jan '10
28 Jan '10
------------------------------------------------------------
revno: 2806
committer: knielsen(a)knielsen-hq.org
branch nick: work-5.1
timestamp: Thu 2010-01-28 23:34:22 +0100
message:
Add support in bintar build script for OpenSolaris.
modified:
BUILD/util.sh
--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1
Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2806)
by knielsenï¼ knielsen-hq.org 28 Jan '10
by knielsenï¼ knielsen-hq.org 28 Jan '10
28 Jan '10
#At lp:maria
2806 knielsen(a)knielsen-hq.org 2010-01-28
Add support in bintar build script for OpenSolaris.
modified:
BUILD/util.sh
=== modified file 'BUILD/util.sh'
--- a/BUILD/util.sh 2010-01-07 12:02:18 +0000
+++ b/BUILD/util.sh 2010-01-28 22:34:22 +0000
@@ -16,6 +16,8 @@
# Setting cpu options.
get_cpuopt () {
+ case "$(uname -o)" in
+ *Linux*)
case "$(gcc -dumpmachine)" in
x86_64-*)
# gcc barfs on -march=... on x64
@@ -26,7 +28,13 @@ get_cpuopt () {
CPUOPT="-m32 -march=i586 -mtune=generic"
;;
esac
- return 0
+ ;;
+ *Solaris*)
+ # ToDo: handle 32-bit build? For now default to 64-bit.
+ CPUOPT="-D__sun -m64 -mtune=athlon64"
+ ;;
+ esac
+ return 0
}
# Default to a parallel build, but only if AM_MAKEFLAGS is not set.
1
0

[Maria-developers] Rev 2750: BUG#31480: Incorrect result for nested subquery when executed via semi join in file:///home/psergey/dev/maria-5.3-subqueries-r3/
by Sergey Petrunya 28 Jan '10
by Sergey Petrunya 28 Jan '10
28 Jan '10
At file:///home/psergey/dev/maria-5.3-subqueries-r3/
------------------------------------------------------------
revno: 2750
revision-id: psergey(a)askmonty.org-20100128152533-q0dicbcuu9fvol5p
parent: psergey(a)askmonty.org-20100128134833-9000udjp5wa3tsff
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.3-subqueries-r3
timestamp: Thu 2010-01-28 18:25:33 +0300
message:
BUG#31480: Incorrect result for nested subquery when executed via semi join
- Make Item_subselect store its "depth", distance to
furthest_correlated_ancestor, and bitmaps of tables that it depends on in
ancestor tables. This allows to have Item_subselect to update its attributes
when it has been pulled out from a select to its parent.
=== modified file 'mysql-test/r/subselect_sj.result'
--- a/mysql-test/r/subselect_sj.result 2010-01-17 14:51:10 +0000
+++ b/mysql-test/r/subselect_sj.result 2010-01-28 15:25:33 +0000
@@ -779,3 +779,48 @@
1 PRIMARY it2 ALL NULL NULL NULL NULL 20 Using where; End temporary
DROP TABLE ot1, it1, it2;
# End of BUG#38075
+#
+# BUG#31480: Incorrect result for nested subquery when executed via semi join
+#
+create table t1 (a int not null, b int not null);
+create table t2 (c int not null, d int not null);
+create table t3 (e int not null);
+insert into t1 values (1,10);
+insert into t1 values (2,10);
+insert into t1 values (1,20);
+insert into t1 values (2,20);
+insert into t1 values (3,20);
+insert into t1 values (2,30);
+insert into t1 values (4,40);
+insert into t2 values (2,10);
+insert into t2 values (2,20);
+insert into t2 values (4,10);
+insert into t2 values (5,10);
+insert into t2 values (3,20);
+insert into t2 values (2,40);
+insert into t3 values (10);
+insert into t3 values (30);
+insert into t3 values (10);
+insert into t3 values (20);
+explain extended
+select a from t1
+where a in (select c from t2 where d >= some(select e from t3 where b=e));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Start temporary
+1 PRIMARY t1 ALL NULL NULL NULL NULL 7 100.00 Using where; End temporary; Using join buffer
+3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t1`.`a` = `test`.`t2`.`c`) and <nop>(<in_optimizer>(`test`.`t2`.`d`,<exists>(select 1 AS `Not_used` from `test`.`t3` where ((`test`.`t1`.`b` = `test`.`t3`.`e`) and (<cache>(`test`.`t2`.`d`) >= `test`.`t3`.`e`))))))
+show warnings;
+Level Code Message
+Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t1`.`a` = `test`.`t2`.`c`) and <nop>(<in_optimizer>(`test`.`t2`.`d`,<exists>(select 1 AS `Not_used` from `test`.`t3` where ((`test`.`t1`.`b` = `test`.`t3`.`e`) and (<cache>(`test`.`t2`.`d`) >= `test`.`t3`.`e`))))))
+select a from t1
+where a in (select c from t2 where d >= some(select e from t3 where b=e));
+a
+2
+2
+3
+2
+drop table t1, t2, t3;
=== modified file 'mysql-test/r/subselect_sj_jcl6.result'
--- a/mysql-test/r/subselect_sj_jcl6.result 2010-01-17 14:51:10 +0000
+++ b/mysql-test/r/subselect_sj_jcl6.result 2010-01-28 15:25:33 +0000
@@ -783,6 +783,51 @@
1 PRIMARY it2 ALL NULL NULL NULL NULL 20 Using where; End temporary; Using join buffer
DROP TABLE ot1, it1, it2;
# End of BUG#38075
+#
+# BUG#31480: Incorrect result for nested subquery when executed via semi join
+#
+create table t1 (a int not null, b int not null);
+create table t2 (c int not null, d int not null);
+create table t3 (e int not null);
+insert into t1 values (1,10);
+insert into t1 values (2,10);
+insert into t1 values (1,20);
+insert into t1 values (2,20);
+insert into t1 values (3,20);
+insert into t1 values (2,30);
+insert into t1 values (4,40);
+insert into t2 values (2,10);
+insert into t2 values (2,20);
+insert into t2 values (4,10);
+insert into t2 values (5,10);
+insert into t2 values (3,20);
+insert into t2 values (2,40);
+insert into t3 values (10);
+insert into t3 values (30);
+insert into t3 values (10);
+insert into t3 values (20);
+explain extended
+select a from t1
+where a in (select c from t2 where d >= some(select e from t3 where b=e));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Start temporary
+1 PRIMARY t1 ALL NULL NULL NULL NULL 7 100.00 Using where; End temporary; Using join buffer
+3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t1`.`a` = `test`.`t2`.`c`) and <nop>(<in_optimizer>(`test`.`t2`.`d`,<exists>(select 1 AS `Not_used` from `test`.`t3` where ((`test`.`t1`.`b` = `test`.`t3`.`e`) and (<cache>(`test`.`t2`.`d`) >= `test`.`t3`.`e`))))))
+show warnings;
+Level Code Message
+Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t1`.`a` = `test`.`t2`.`c`) and <nop>(<in_optimizer>(`test`.`t2`.`d`,<exists>(select 1 AS `Not_used` from `test`.`t3` where ((`test`.`t1`.`b` = `test`.`t3`.`e`) and (<cache>(`test`.`t2`.`d`) >= `test`.`t3`.`e`))))))
+select a from t1
+where a in (select c from t2 where d >= some(select e from t3 where b=e));
+a
+2
+2
+3
+2
+drop table t1, t2, t3;
set join_cache_level=default;
show variables like 'join_cache_level';
Variable_name Value
=== modified file 'mysql-test/t/subselect_sj.test'
--- a/mysql-test/t/subselect_sj.test 2010-01-17 14:51:10 +0000
+++ b/mysql-test/t/subselect_sj.test 2010-01-28 15:25:33 +0000
@@ -681,3 +681,41 @@
DROP TABLE ot1, it1, it2;
--echo # End of BUG#38075
+
+--echo #
+--echo # BUG#31480: Incorrect result for nested subquery when executed via semi join
+--echo #
+create table t1 (a int not null, b int not null);
+create table t2 (c int not null, d int not null);
+create table t3 (e int not null);
+
+insert into t1 values (1,10);
+insert into t1 values (2,10);
+insert into t1 values (1,20);
+insert into t1 values (2,20);
+insert into t1 values (3,20);
+insert into t1 values (2,30);
+insert into t1 values (4,40);
+
+insert into t2 values (2,10);
+insert into t2 values (2,20);
+insert into t2 values (4,10);
+insert into t2 values (5,10);
+insert into t2 values (3,20);
+insert into t2 values (2,40);
+
+insert into t3 values (10);
+insert into t3 values (30);
+insert into t3 values (10);
+insert into t3 values (20);
+
+explain extended
+select a from t1
+where a in (select c from t2 where d >= some(select e from t3 where b=e));
+show warnings;
+
+select a from t1
+where a in (select c from t2 where d >= some(select e from t3 where b=e));
+
+drop table t1, t2, t3;
+
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2010-01-17 14:55:08 +0000
+++ b/sql/item.cc 2010-01-28 15:25:33 +0000
@@ -2211,7 +2211,8 @@
}
-void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref)
+void Item_field::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **ref)
{
if (new_parent == depended_from)
depended_from= NULL;
@@ -3648,7 +3649,7 @@
static void mark_as_dependent(THD *thd, SELECT_LEX *last, SELECT_LEX *current,
Item_ident *resolved_item,
- Item_ident *mark_item)
+ Item_ident *mark_item, table_map dep_map)
{
const char *db_name= (resolved_item->db_name ?
resolved_item->db_name : "");
@@ -3657,7 +3658,7 @@
/* store pointer on SELECT_LEX from which item is dependent */
if (mark_item)
mark_item->depended_from= last;
- current->mark_as_dependent(last, resolved_item);
+ current->mark_as_dependent(last, resolved_item, dep_map);
if (thd->lex->describe & DESCRIBE_EXTENDED)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
@@ -3715,21 +3716,26 @@
Item_subselect *prev_subselect_item=
previous_select->master_unit()->item;
Item_ident *dependent= resolved_item;
+ table_map found_used_tables;
if (found_field == view_ref_found)
{
Item::Type type= found_item->type();
+ found_used_tables= found_item->used_tables();
prev_subselect_item->used_tables_cache|=
- found_item->used_tables();
+ found_used_tables;
dependent= ((type == Item::REF_ITEM || type == Item::FIELD_ITEM) ?
(Item_ident*) found_item :
0);
}
else
+ {
+ found_used_tables= found_field->table->map;
prev_subselect_item->used_tables_cache|=
found_field->table->map;
+ }
prev_subselect_item->const_item_cache= 0;
mark_as_dependent(thd, last_select, current_sel, resolved_item,
- dependent);
+ dependent, found_used_tables);
}
}
@@ -4010,6 +4016,7 @@
SELECT_LEX *current_sel= (SELECT_LEX *) thd->lex->current_select;
Name_resolution_context *outer_context= 0;
SELECT_LEX *select= 0;
+ uint n_levels= 0;
/* Currently derived tables cannot be correlated */
if (current_sel->master_unit()->first_select()->linkage !=
DERIVED_TABLE_TYPE)
@@ -4102,7 +4109,8 @@
context->select_lex, this,
((ref_type == REF_ITEM ||
ref_type == FIELD_ITEM) ?
- (Item_ident*) (*reference) : 0));
+ (Item_ident*) (*reference) : 0),
+ (*from_field)->table->map);
return 0;
}
}
@@ -4117,7 +4125,8 @@
context->select_lex, this,
((ref_type == REF_ITEM || ref_type == FIELD_ITEM) ?
(Item_ident*) (*reference) :
- 0));
+ 0),
+ (*reference)->used_tables());
/*
A reference to a view field had been found and we
substituted it instead of this Item (find_field_in_tables
@@ -4151,6 +4160,7 @@
*/
prev_subselect_item->used_tables_cache|= OUTER_REF_TABLE_BIT;
prev_subselect_item->const_item_cache= 0;
+ n_levels++;
}
DBUG_ASSERT(ref != 0);
@@ -4218,14 +4228,15 @@
mark_as_dependent(thd, last_checked_context->select_lex,
context->select_lex, this,
- rf);
+ rf, rf->used_tables());
return 0;
}
else
{
mark_as_dependent(thd, last_checked_context->select_lex,
context->select_lex,
- this, (Item_ident*)*reference);
+ this, (Item_ident*)*reference,
+ (*reference)->used_tables());
if (last_checked_context->select_lex->having_fix_field)
{
Item_ref *rf;
@@ -5947,7 +5958,8 @@
((refer_type == REF_ITEM ||
refer_type == FIELD_ITEM) ?
(Item_ident*) (*reference) :
- 0));
+ 0),
+ (*reference)->used_tables());
/*
view reference found, we substituted it instead of this
Item, so can quit
@@ -5997,7 +6009,8 @@
goto error;
thd->change_item_tree(reference, fld);
mark_as_dependent(thd, last_checked_context->select_lex,
- thd->lex->current_select, this, fld);
+ thd->lex->current_select, this, fld,
++ from_field->table->map);
/*
A reference is resolved to a nest level that's outer or the same as
the nest level of the enclosing set function : adjust the value of
@@ -6020,7 +6033,8 @@
/* Should be checked in resolve_ref_in_select_and_group(). */
DBUG_ASSERT(*ref && (*ref)->fixed);
mark_as_dependent(thd, last_checked_context->select_lex,
- context->select_lex, this, this);
+ context->select_lex, this, this,
+ (*ref)->used_tables());
/*
A reference is resolved to a nest level that's outer or the same as
the nest level of the enclosing set function : adjust the value of
@@ -6432,20 +6446,22 @@
}
-void Item_outer_ref::fix_after_pullout(st_select_lex *new_parent, Item **ref)
+void Item_outer_ref::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **ref)
{
if (depended_from == new_parent)
{
*ref= outer_ref;
- outer_ref->fix_after_pullout(new_parent, ref);
+ (*ref)->fix_after_pullout(new_parent, parent_tables, ref);
}
}
-void Item_ref::fix_after_pullout(st_select_lex *new_parent, Item **refptr)
+void Item_ref::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **refptr)
{
if (depended_from == new_parent)
{
- (*ref)->fix_after_pullout(new_parent, ref);
+ (*ref)->fix_after_pullout(new_parent, parent_tables, ref);
depended_from= NULL;
}
}
=== modified file 'sql/item.h'
--- a/sql/item.h 2010-01-28 13:48:33 +0000
+++ b/sql/item.h 2010-01-28 15:25:33 +0000
@@ -569,7 +569,8 @@
Fix after some tables has been pulled out. Basically re-calculate all
attributes that are dependent on the tables.
*/
- virtual void fix_after_pullout(st_select_lex *new_parent, Item **ref) {};
+ virtual void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref) {};
/*
should be used in case where we are sure that we do not need
@@ -1574,7 +1575,8 @@
bool send(Protocol *protocol, String *str_arg);
void reset_field(Field *f);
bool fix_fields(THD *, Item **);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
void make_field(Send_field *tmp_field);
int save_in_field(Field *field,bool no_conversions);
void save_org_in_field(Field *field);
@@ -2343,7 +2345,8 @@
bool send(Protocol *prot, String *tmp);
void make_field(Send_field *field);
bool fix_fields(THD *, Item **);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
int save_in_field(Field *field, bool no_conversions);
void save_org_in_field(Field *field);
enum Item_result result_type () const { return (*ref)->result_type(); }
@@ -2520,7 +2523,8 @@
outer_ref->save_org_in_field(result_field);
}
bool fix_fields(THD *, Item **);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
table_map used_tables() const
{
return (*ref)->const_item() ? 0 : OUTER_REF_TABLE_BIT;
=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc 2010-01-17 14:55:08 +0000
+++ b/sql/item_cmpfunc.cc 2010-01-28 15:25:33 +0000
@@ -3959,7 +3959,8 @@
}
-void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref)
+void Item_cond::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **ref)
{
List_iterator<Item> li(list);
Item *item;
@@ -3973,7 +3974,7 @@
while ((item=li++))
{
table_map tmp_table_map;
- item->fix_after_pullout(new_parent, li.ref());
+ item->fix_after_pullout(new_parent, parent_tables, li.ref());
item= *li.ref();
used_tables_cache|= item->used_tables();
const_item_cache&= item->const_item();
=== modified file 'sql/item_cmpfunc.h'
--- a/sql/item_cmpfunc.h 2010-01-17 14:55:08 +0000
+++ b/sql/item_cmpfunc.h 2010-01-28 15:25:33 +0000
@@ -1472,7 +1472,8 @@
bool add_at_head(Item *item) { return list.push_front(item); }
void add_at_head(List<Item> *nlist) { list.prepand(nlist); }
bool fix_fields(THD *, Item **ref);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
enum Type type() const { return COND_ITEM; }
List<Item>* argument_list() { return &list; }
=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc 2010-01-28 13:48:33 +0000
+++ b/sql/item_func.cc 2010-01-28 15:25:33 +0000
@@ -206,7 +206,8 @@
}
-void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref)
+void Item_func::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **ref)
{
Item **arg,**arg_end;
@@ -217,7 +218,7 @@
{
for (arg=args, arg_end=args+arg_count; arg != arg_end ; arg++)
{
- (*arg)->fix_after_pullout(new_parent, arg);
+ (*arg)->fix_after_pullout(new_parent, parent_tables, arg);
Item *item= *arg;
used_tables_cache|= item->used_tables();
=== modified file 'sql/item_func.h'
--- a/sql/item_func.h 2010-01-28 13:48:33 +0000
+++ b/sql/item_func.h 2010-01-28 15:25:33 +0000
@@ -117,7 +117,8 @@
// Constructor used for Item_cond_and/or (see Item comment)
Item_func(THD *thd, Item_func *item);
bool fix_fields(THD *, Item **ref);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
table_map used_tables() const;
table_map not_null_tables() const;
void update_used_tables();
=== modified file 'sql/item_row.cc'
--- a/sql/item_row.cc 2010-01-17 14:55:08 +0000
+++ b/sql/item_row.cc 2010-01-28 15:25:33 +0000
@@ -125,13 +125,14 @@
}
-void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref)
+void Item_row::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **ref)
{
used_tables_cache= 0;
const_item_cache= 1;
for (uint i= 0; i < arg_count; i++)
{
- items[i]->fix_after_pullout(new_parent, &items[i]);
+ items[i]->fix_after_pullout(new_parent, parent_tables, &items[i]);
used_tables_cache|= items[i]->used_tables();
const_item_cache&= items[i]->const_item();
}
=== modified file 'sql/item_row.h'
--- a/sql/item_row.h 2010-01-17 14:55:08 +0000
+++ b/sql/item_row.h 2010-01-28 15:25:33 +0000
@@ -59,7 +59,8 @@
return 0;
};
bool fix_fields(THD *thd, Item **ref);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
void cleanup();
void split_sum_func(THD *thd, Item **ref_pointer_array, List<Item> &fields);
table_map used_tables() const { return used_tables_cache; };
=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc 2010-01-28 13:48:33 +0000
+++ b/sql/item_subselect.cc 2010-01-28 15:25:33 +0000
@@ -39,8 +39,8 @@
Item_subselect::Item_subselect():
Item_result_field(), value_assigned(0), thd(0), substitution(0),
engine(0), old_engine(0), used_tables_cache(0), have_to_be_excluded(0),
- const_item_cache(1), in_fix_fields(0), engine_changed(0), changed(0),
- is_correlated(FALSE)
+ const_item_cache(1), inside_first_fix_fields(0), in_fix_fields(0),
+ ancestor_used_tables(0), engine_changed(0), changed(0), is_correlated(FALSE)
{
with_subselect= 1;
reset();
@@ -159,6 +159,15 @@
}
+void Item_subselect::set_depth()
+{
+ uint n= 0;
+ for (SELECT_LEX *s= unit->first_select(); s; s= s->outer_select())
+ n++;
+ this->depth= n - 1;
+}
+
+
bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
{
char const *save_where= thd_param->where;
@@ -169,6 +178,18 @@
engine->set_thd((thd= thd_param));
if (!in_fix_fields)
refers_to.empty();
+ if (!ancestor_used_tables)
+ {
+ set_depth();
+ size_t size= (1+depth) * sizeof(table_map);
+ if (!(ancestor_used_tables= (table_map*)
+ alloc_root(thd->stmt_arena->mem_root, size)))
+ return TRUE;
+ bzero(ancestor_used_tables, size);
+ furthest_correlated_ancestor= 0;
+ inside_first_fix_fields= TRUE;
+ }
+
eliminated= FALSE;
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&res))
@@ -179,6 +200,7 @@
// all transformation is done (used by prepared statements)
changed= 1;
+ inside_first_fix_fields= FALSE;
if (!res)
{
@@ -258,6 +280,65 @@
return FALSE;
}
+void Item_subselect::mark_as_dependent(uint n_levels, table_map dep_map)
+{
+ if (inside_first_fix_fields)
+ {
+ is_correlated= TRUE;
+ furthest_correlated_ancestor= max(furthest_correlated_ancestor, n_levels);
+ if (n_levels > 1)
+ ancestor_used_tables[n_levels - 2] |= dep_map;
+ }
+}
+
+
+/*
+ Adjust attributes after our parent select has been merged into grandparent
+
+ DESCRIPTION
+ Subquery is a composite object which may be correlated, that is, it may
+ have
+ 1. references to tables of the parent select (i.e. one that has the clause
+ with the subquery predicate)
+ 2. references to tables of the grandparent select
+ 3. references to tables of further ancestors.
+
+ Before the pullout, this item indicates:
+ - #1 with table bits in used_tables()
+ - #2 and #3 with OUTER_REF_TABLE_BIT.
+
+ After parent has been merged with grandparent:
+ - references to parent and grandparent tables should be indicated with
+ table bits.
+ - references to greatgrandparent and further ancestors - with
+ OUTER_REF_TABLE_BIT.
+
+ This is exactly what this function does, based on pre-collected info in
+ ancestor_used_tables and furthest_correlated_ancestor.
+*/
+
+void Item_subselect::fix_after_pullout(st_select_lex *new_parent,
+ uint parent_tables, Item **ref)
+{
+ used_tables_cache= (used_tables_cache << parent_tables) |
+ ancestor_used_tables[0];
+ for (uint i=0; i < depth; i++)
+ ancestor_used_tables[i]= ancestor_used_tables[i+1];
+ depth--;
+
+ if (furthest_correlated_ancestor)
+ furthest_correlated_ancestor--;
+ used_tables_cache &= ~OUTER_REF_TABLE_BIT;
+ if (furthest_correlated_ancestor > 1)
+ used_tables_cache |= OUTER_REF_TABLE_BIT;
+ /*
+ Don't update const_tables_cache yet as we don't yet know which of the
+ parent's tables are constant. Parent will call update_used_tables() anyway,
+ and that will be our chance to update.
+ */
+}
+
+
bool Item_subselect::walk(Item_processor processor, bool walk_subquery,
uchar *argument)
{
=== modified file 'sql/item_subselect.h'
--- a/sql/item_subselect.h 2010-01-28 13:48:33 +0000
+++ b/sql/item_subselect.h 2010-01-28 15:25:33 +0000
@@ -68,6 +68,37 @@
/* cache of constant state */
bool const_item_cache;
+ int inside_first_fix_fields;
+public:
+ /*
+ Depth of the subquery predicate.
+ If the subquery predicate is attatched to some clause of the top-level
+ select, depth will be 1
+ If it is attached to a clause in a subquery of the top-level select, depth
+ will be 2 and so forth.
+ */
+ uint depth;
+
+ /*
+ Maximum correlation level of the select
+ - select that has no references to outside will have 0,
+ - select that references tables in the select it is located will have 1,
+ - select that has references to tables of its parent select will have 2,
+ - select that has references to tables of grandparent will have 3
+ and so forth.
+ */
+ uint furthest_correlated_ancestor;
+ /*
+ This is used_tables() for non-direct ancestors. That is,
+ - used_tables() shows which tables of the parent select are referred to
+ from within the subquery,
+ - ancestor_used_tables[0] shows which tables of the grandparent select are
+ referred to from within the subquery,
+ - ancestor_used_tables[1] shows which tables of the great grand parent
+ select... and so forth.
+ */
+ table_map *ancestor_used_tables;
+
public:
/*
References from inside the subquery to the select that this predicate is
@@ -92,6 +123,7 @@
Item_subselect();
virtual subs_type substype() { return UNKNOWN_SUBS; }
+ void set_depth();
/*
We need this method, because some compilers do not allow 'this'
@@ -117,6 +149,9 @@
return null_value;
}
bool fix_fields(THD *thd, Item **ref);
+ void mark_as_dependent(uint n_levels, table_map dep_map);
+ void fix_after_pullout(st_select_lex *new_parent, uint parent_tables,
+ Item **ref);
virtual bool exec();
virtual void fix_length_and_dec();
table_map used_tables() const;
=== modified file 'sql/item_sum.cc'
--- a/sql/item_sum.cc 2009-10-15 21:38:29 +0000
+++ b/sql/item_sum.cc 2010-01-28 15:25:33 +0000
@@ -350,7 +350,7 @@
sl= sl->master_unit()->outer_select() )
sl->master_unit()->item->with_sum_func= 1;
}
- thd->lex->current_select->mark_as_dependent(aggr_sel, NULL);
+ thd->lex->current_select->mark_as_dependent(aggr_sel, NULL, 0);
return FALSE;
}
=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc 2010-01-28 13:48:33 +0000
+++ b/sql/sql_lex.cc 2010-01-28 15:25:33 +0000
@@ -1841,8 +1841,10 @@
'last' should be reachable from this st_select_lex_node
*/
-void st_select_lex::mark_as_dependent(st_select_lex *last, Item *dependency)
+void st_select_lex::mark_as_dependent(st_select_lex *last, Item *dependency,
+ table_map dep_map)
{
+ uint n_levels= master_unit()->item->depth;
SELECT_LEX *next_to_last;
/*
Mark all selects from resolved to 1 before select where was
@@ -1868,6 +1870,11 @@
}
}
next_to_last= s;
+ Item_subselect *subquery_predicate= s->master_unit()->item;
+ if (subquery_predicate)
+ subquery_predicate->mark_as_dependent(n_levels, dep_map);
+ n_levels--;
+ //psergey-merge-todo: next_to_last should be removed??
}
is_correlated= TRUE;
this->master_unit()->item->is_correlated= TRUE;
=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h 2010-01-28 13:48:33 +0000
+++ b/sql/sql_lex.h 2010-01-28 15:25:33 +0000
@@ -747,7 +747,8 @@
return master_unit()->return_after_parsing();
}
- void mark_as_dependent(st_select_lex *last, Item *dependency);
+ void mark_as_dependent(st_select_lex *last, Item *dependency,
+ table_map dep_map);
bool set_braces(bool value);
bool inc_in_sum_expr();
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2010-01-28 13:48:33 +0000
+++ b/sql/sql_select.cc 2010-01-28 15:25:33 +0000
@@ -3144,16 +3144,23 @@
}
-void fix_list_after_tbl_changes(SELECT_LEX *new_parent, List<TABLE_LIST> *tlist)
+void fix_list_after_tbl_changes(SELECT_LEX *new_parent, uint parent_tables,
+ List<TABLE_LIST> *tlist)
{
List_iterator<TABLE_LIST> it(*tlist);
TABLE_LIST *table;
while ((table= it++))
{
if (table->on_expr)
- table->on_expr->fix_after_pullout(new_parent, &table->on_expr);
+ {
+ table->on_expr->fix_after_pullout(new_parent, parent_tables,
+ &table->on_expr);
+ }
if (table->nested_join)
- fix_list_after_tbl_changes(new_parent, &table->nested_join->join_list);
+ {
+ fix_list_after_tbl_changes(new_parent, parent_tables,
+ &table->nested_join->join_list);
+ }
}
}
@@ -3357,6 +3364,7 @@
/*TODO: also reset the 'with_subselect' there. */
/* n. Adjust the parent_join->tables counter */
+ uint parent_tables= parent_join->tables;
uint table_no= parent_join->tables;
/* n. Walk through child's tables and adjust table->map */
for (tl= subq_lex->leaf_tables; tl; tl= tl->next_leaf, table_no++)
@@ -3434,8 +3442,10 @@
Walk through sj nest's WHERE and ON expressions and call
item->fix_table_changes() for all items.
*/
- sj_nest->sj_on_expr->fix_after_pullout(parent_lex, &sj_nest->sj_on_expr);
- fix_list_after_tbl_changes(parent_lex, &sj_nest->nested_join->join_list);
+ sj_nest->sj_on_expr->fix_after_pullout(parent_lex, parent_join->tables,
+ &sj_nest->sj_on_expr);
+ fix_list_after_tbl_changes(parent_lex, parent_join->tables,
+ &sj_nest->nested_join->join_list);
/* Unlink the child select_lex so it doesn't show up in EXPLAIN: */
1
1

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2806)
by Michael Widenius 28 Jan '10
by Michael Widenius 28 Jan '10
28 Jan '10
#At lp:maria based on revid:monty@askmonty.org-20100128113510-bmn8nf14b76l3mof
2806 Michael Widenius 2010-01-28
Fixed compiler warnings & failing test cases
When compiling with debug, don't clear buffer in 'net_clear()'
- This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap
modified:
client/mysqltest.cc
mysql-test/t/partition_innodb_semi_consistent.test
sql/net_serv.cc
storage/myisam/ft_boolean_search.c
storage/myisam/ft_parser.c
storage/myisam/ft_stopwords.c
support-files/compiler_warnings.supp
unittest/mysys/waiting_threads-t.c
per-file messages:
client/mysqltest.cc
Fixed compiler warning
mysql-test/t/partition_innodb_semi_consistent.test
Added missing --reap (fixes random failure)
sql/net_serv.cc
When compiling with debug, don't clear buffer in 'net_clear()'
- This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap
storage/myisam/ft_boolean_search.c
Fixed compiler warnings
storage/myisam/ft_parser.c
Fixed compiler warnings
storage/myisam/ft_stopwords.c
Fixed compiler warnings
support-files/compiler_warnings.supp
Added a lot of new suppression of not relevant warnings and warnings in systems we are not in charge of
unittest/mysys/waiting_threads-t.c
Fixed compiler warnings
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2010-01-15 15:27:55 +0000
+++ b/client/mysqltest.cc 2010-01-28 14:49:14 +0000
@@ -657,7 +657,9 @@ public:
}
while ((bytes= fread(buf, 1, sizeof(buf), m_file)) > 0)
- fwrite(buf, 1, bytes, stderr);
+ if (fwrite(buf, 1, bytes, stderr))
+ die("Failed to write to '%s', errno: %d",
+ m_file_name, errno);
if (!lines)
{
=== modified file 'mysql-test/t/partition_innodb_semi_consistent.test'
--- a/mysql-test/t/partition_innodb_semi_consistent.test 2009-01-13 22:12:16 +0000
+++ b/mysql-test/t/partition_innodb_semi_consistent.test 2010-01-28 14:49:14 +0000
@@ -187,6 +187,7 @@ SELECT * FROM t1;
--echo # Switch to connection con2
connection con2;
+--reap
SELECT * FROM t1;
connection default;
=== modified file 'sql/net_serv.cc'
--- a/sql/net_serv.cc 2009-09-07 20:50:10 +0000
+++ b/sql/net_serv.cc 2010-01-28 14:49:14 +0000
@@ -286,7 +286,12 @@ void net_clear(NET *net, my_bool clear_b
#endif
DBUG_ENTER("net_clear");
-#if !defined(EMBEDDED_LIBRARY)
+/*
+ We don't do a clear in case of DBUG_OFF to catch bugs
+ in the protocol handling
+*/
+
+#if !defined(EMBEDDED_LIBRARY) && defined(DBUG_OFF)
if (clear_buffer)
{
while ((ready= net_data_is_ready(net->vio->sd)) > 0)
=== modified file 'storage/myisam/ft_boolean_search.c'
--- a/storage/myisam/ft_boolean_search.c 2010-01-27 21:53:08 +0000
+++ b/storage/myisam/ft_boolean_search.c 2010-01-28 14:49:14 +0000
@@ -321,7 +321,7 @@ static int _ftb_parse_query(FTB *ftb, uc
param->mysql_add_word= ftb_query_add_word;
param->mysql_ftparam= (void *)&ftb_param;
param->cs= ftb->charset;
- param->doc= (char*) query;
+ param->doc= query;
param->length= len;
param->flags= 0;
param->mode= MYSQL_FTPARSER_FULL_BOOLEAN_INFO;
@@ -702,7 +702,7 @@ static int _ftb_check_phrase(FTB *ftb, c
param->mysql_add_word= ftb_phrase_add_word;
param->mysql_ftparam= (void *)&ftb_param;
param->cs= ftb->charset;
- param->doc= (char *) document;
+ param->doc= document;
param->length= len;
param->flags= 0;
param->mode= MYSQL_FTPARSER_WITH_STOPWORDS;
@@ -1000,7 +1000,7 @@ float ft_boolean_find_relevance(FT_INFO
{
if (!ftsi.pos)
continue;
- param->doc= (char *)ftsi.pos;
+ param->doc= ftsi.pos;
param->length= ftsi.len;
if (unlikely(parser->parse(param)))
return 0;
=== modified file 'storage/myisam/ft_parser.c'
--- a/storage/myisam/ft_parser.c 2010-01-27 21:53:08 +0000
+++ b/storage/myisam/ft_parser.c 2010-01-28 14:49:14 +0000
@@ -175,7 +175,7 @@ uchar ft_get_word(CHARSET_INFO *cs, cons
if ((param->trunc=(doc<end && *doc == FTB_TRUNC)))
doc++;
- if (((length >= ft_min_word_len && !is_stopword((char*) word->pos,
+ if (((length >= ft_min_word_len && !is_stopword(word->pos,
word->len))
|| param->trunc) && length < ft_max_word_len)
{
@@ -298,7 +298,7 @@ static int ft_parse_internal(MYSQL_FTPAR
DBUG_ENTER("ft_parse_internal");
while (ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
- if (param->mysql_add_word(param, (char*) w.pos, w.len, 0))
+ if (param->mysql_add_word(param, w.pos, w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
@@ -319,7 +319,7 @@ int ft_parse(TREE *wtree, const uchar *d
param->mysql_add_word= ft_add_word;
param->mysql_ftparam= &my_param;
param->cs= wtree->custom_arg;
- param->doc= (char*) doc;
+ param->doc= doc;
param->length= doclen;
param->mode= MYSQL_FTPARSER_SIMPLE_MODE;
DBUG_RETURN(parser->parse(param));
=== modified file 'storage/myisam/ft_stopwords.c'
--- a/storage/myisam/ft_stopwords.c 2010-01-27 21:53:08 +0000
+++ b/storage/myisam/ft_stopwords.c 2010-01-28 14:49:14 +0000
@@ -20,7 +20,7 @@
typedef struct st_ft_stopwords
{
- const char * pos;
+ const uchar* pos;
size_t len;
} FT_STOPWORD;
@@ -30,15 +30,15 @@ static int FT_STOPWORD_cmp(void* cmp_arg
FT_STOPWORD *w1, FT_STOPWORD *w2)
{
return ha_compare_text(default_charset_info,
- (uchar *)w1->pos,w1->len,
- (uchar *)w2->pos,w2->len,0,0);
+ w1->pos, w1->len,
+ w2->pos, w2->len, 0, 0);
}
static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action,
void *arg __attribute__((unused)))
{
if (action == free_free)
- my_free((uchar*) w->pos, MYF(0));
+ my_free((void*) w->pos, MYF(0));
}
static int ft_add_stopword(const char *w)
=== modified file 'support-files/compiler_warnings.supp'
--- a/support-files/compiler_warnings.supp 2010-01-28 11:35:10 +0000
+++ b/support-files/compiler_warnings.supp 2010-01-28 14:49:14 +0000
@@ -4,6 +4,7 @@
#
integer.cpp: .*control reaches end of non-void function.*: 1288-1427
+integer.cpp: .*no return statement in function returning non-void.*: 1288-1427
DictTabInfo.cpp : .*invalid access to non-static.*
DictTabInfo.cpp : .*macro was used incorrectly.*
DbdihMain.cpp : .*unused variable.* : 6666-7013
@@ -27,13 +28,17 @@ _flex_tmp.c: .*not enough actual paramet
pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.*
btr/btr0cur\.c: .*value computed is not used.*: 3175-3375
include/buf0buf\.ic: unused parameter ���mtr���
+fil/fil0fil\.c: pointer targets in passing argument.*differ in signedness
fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199
fil/fil0fil\.c: unused parameter
log/log0recv\.c: unused variable
os/os0file\.c: unused parameter
+os/os0file\.c: pointer targets in assignment differ in signedness
handler/i_s\.cc: unused variable
sync/sync0rw\.c: unused parameter
sync/sync0sync\.c: unused parameter
+sync/sync0sync\.c: unused variable
+ut/ut0ut\.c: ignoring return value of
#
# bdb is not critical to keep up to date
@@ -98,10 +103,15 @@ storage/maria/ma_pagecache.c: .*'info_ch
# I think these are due to mix of C and C++.
#
storage/pbxt/ : typedef.*was ignored in this declaration
+ha_pbxt\.cc : variable.*might be clobbered by.*longjmp
#
# Yassl
include/runtime.hpp: .*pure_error.*
+.*/extra/yassl/taocrypt/.*: comparison with string literal
+.*/extra/yassl/taocrypt/src/blowfish\.cpp: array subscript is above array bounds
+.*/extra/yassl/taocrypt/src/file\.cpp: ignoring return value
+.*/extra/yassl/taocrypt/src/integer\.cpp: control reaches end of non-void function
#
# Groff warnings on OpenSUSE.
=== modified file 'unittest/mysys/waiting_threads-t.c'
--- a/unittest/mysys/waiting_threads-t.c 2009-09-15 10:46:35 +0000
+++ b/unittest/mysys/waiting_threads-t.c 2010-01-28 14:49:14 +0000
@@ -258,7 +258,7 @@ void do_tests()
#define test_kill_strategy(X) \
diag("kill strategy: " #X); \
DBUG_EXECUTE("reset_file", \
- { rewind(DBUG_FILE); ftruncate(fileno(DBUG_FILE), 0); }); \
+ { rewind(DBUG_FILE); (void) ftruncate(fileno(DBUG_FILE), 0); }); \
DBUG_PRINT("info", ("kill strategy: " #X)); \
kill_strategy=X; \
do_one_test();
1
0

[Maria-developers] Rev 2749: Subquery optimizations: non-semijoin materialization in file:///home/psergey/dev/maria-5.3-subqueries-r3/
by Sergey Petrunya 28 Jan '10
by Sergey Petrunya 28 Jan '10
28 Jan '10
At file:///home/psergey/dev/maria-5.3-subqueries-r3/
------------------------------------------------------------
revno: 2749
revision-id: psergey(a)askmonty.org-20100128134833-9000udjp5wa3tsff
parent: psergey(a)askmonty.org-20100118223223-0sxbi4py9i0guf1l
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.3-subqueries-r3
timestamp: Thu 2010-01-28 16:48:33 +0300
message:
Subquery optimizations: non-semijoin materialization
- Backport into Maria DB 5.3, part 1
Diff too large for email (2209 lines, the limit is 1000).
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2805)
by Michael Widenius 28 Jan '10
by Michael Widenius 28 Jan '10
28 Jan '10
#At lp:maria based on revid:knielsen@knielsen-hq.org-20100128072046-x28qsbhoudenjj0f
2805 Michael Widenius 2010-01-28 [merge]
Merge with fixes for compiler warnings and 2 fixed test cases
Fixed some additional compiler warnings from OpenSolaris build.
modified:
extra/libevent/devpoll.c
include/ft_global.h
include/maria.h
mysql-test/r/show_check.result
mysql-test/suite/rpl/t/rpl_rotate_logs.test
mysql-test/t/show_check-master.opt
mysys/my_file.c
sql/item.cc
sql/mysqld.cc
sql/rpl_record.cc
storage/maria/ft_maria.c
storage/maria/ma_blockrec.c
storage/myisam/ft_boolean_search.c
storage/myisam/ft_myisam.c
storage/myisam/ft_nlq_search.c
storage/myisam/ft_parser.c
storage/myisam/ft_stopwords.c
storage/myisam/ftdefs.h
storage/xtradb/buf/buf0buf.c
storage/xtradb/handler/i_s.cc
support-files/compiler_warnings.supp
per-file messages:
extra/libevent/devpoll.c
Fixed compiler warning
mysys/my_file.c
Fixed compiler warning
sql/mysqld.cc
Fixed compiler warning
sql/rpl_record.cc
Removed not used variable
storage/maria/ma_blockrec.c
Fixed compiler warning
storage/xtradb/buf/buf0buf.c
Fixed compiler warning
storage/xtradb/handler/i_s.cc
Fixed compiler warning
support-files/compiler_warnings.supp
Added suppression of compiler warnings in InnoDB/XtraDB
Added suppression of compiler warnings that can safely be ignored.
=== modified file 'extra/libevent/devpoll.c'
--- a/extra/libevent/devpoll.c 2010-01-07 13:00:06 +0000
+++ b/extra/libevent/devpoll.c 2010-01-28 11:35:10 +0000
@@ -140,7 +140,7 @@ devpoll_init(struct event_base *base)
return (NULL);
if (getrlimit(RLIMIT_NOFILE, &rl) == 0 &&
- rl.rlim_cur != RLIM_INFINITY)
+ (unsigned long long) rl.rlim_cur != (unsigned long long) RLIM_INFINITY)
nfiles = rl.rlim_cur - 1;
/* Initialize the kernel queue */
=== modified file 'include/ft_global.h'
--- a/include/ft_global.h 2009-11-30 13:36:06 +0000
+++ b/include/ft_global.h 2010-01-27 21:53:08 +0000
@@ -62,7 +62,8 @@ void ft_free_stopwords(void);
#define FT_SORTED 2
#define FT_EXPAND 4 /* query expansion */
-FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,CHARSET_INFO *, uchar *);
+FT_INFO *ft_init_search(uint,void *, uint, uchar *, size_t,
+ CHARSET_INFO *, uchar *);
my_bool ft_boolean_check_syntax_string(const uchar *);
/* Internal symbols for fulltext between maria and MyISAM */
=== modified file 'include/maria.h'
--- a/include/maria.h 2009-02-19 09:01:25 +0000
+++ b/include/maria.h 2010-01-27 21:53:08 +0000
@@ -462,7 +462,7 @@ void maria_versioning(MARIA_HA *info, my
void maria_ignore_trids(MARIA_HA *info);
/* fulltext functions */
-FT_INFO *maria_ft_init_search(uint,void *, uint, uchar *, uint,
+FT_INFO *maria_ft_init_search(uint,void *, uint, uchar *, size_t,
CHARSET_INFO *, uchar *);
/* 'Almost-internal' Maria functions */
=== modified file 'mysql-test/r/show_check.result'
--- a/mysql-test/r/show_check.result 2009-12-15 09:03:24 +0000
+++ b/mysql-test/r/show_check.result 2010-01-27 21:53:08 +0000
@@ -252,13 +252,11 @@ drop table t1;
flush tables;
show open tables;
Database Table In_use Name_locked
-mysql general_log 0 0
create table t1(n int);
insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
test t1 0 0
-mysql general_log 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
show create table t1;
=== modified file 'mysql-test/suite/rpl/t/rpl_rotate_logs.test'
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2009-03-12 09:48:41 +0000
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2010-01-27 21:53:08 +0000
@@ -153,7 +153,7 @@ disable_query_log;
while ($1)
{
#eval means expand $ expressions
- eval insert into t3 values($1 + 4);
+ eval insert HIGH_PRIORITY into t3 values($1 + 4);
dec $1;
}
enable_query_log;
=== modified file 'mysql-test/t/show_check-master.opt'
--- a/mysql-test/t/show_check-master.opt 2009-12-03 11:19:05 +0000
+++ b/mysql-test/t/show_check-master.opt 2010-01-27 21:53:08 +0000
@@ -1 +1 @@
---log-output=table --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="" --slow-query-log-file=""
+--log-output=file --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="foo" --slow-query-log-file=""
=== modified file 'mysys/my_file.c'
--- a/mysys/my_file.c 2006-12-23 19:20:40 +0000
+++ b/mysys/my_file.c 2010-01-28 11:35:10 +0000
@@ -51,7 +51,7 @@ static uint set_max_open_files(uint max_
DBUG_PRINT("info", ("rlim_cur: %u rlim_max: %u",
(uint) rlimit.rlim_cur,
(uint) rlimit.rlim_max));
- if (rlimit.rlim_cur == RLIM_INFINITY)
+ if ((ulonglong) rlimit.rlim_cur == (ulonglong) RLIM_INFINITY)
rlimit.rlim_cur = max_file_limit;
if (rlimit.rlim_cur >= max_file_limit)
DBUG_RETURN(rlimit.rlim_cur); /* purecov: inspected */
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2010-01-15 15:27:55 +0000
+++ b/sql/item.cc 2010-01-27 21:53:08 +0000
@@ -7119,7 +7119,7 @@ double Item_cache_decimal::val_real()
DBUG_ASSERT(fixed);
double res;
if (!value_cached && !cache_value())
- return NULL;
+ return 0.0;
my_decimal2double(E_DEC_FATAL_ERROR, &decimal_value, &res);
return res;
}
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-01-15 15:27:55 +0000
+++ b/sql/mysqld.cc 2010-01-28 11:35:10 +0000
@@ -2704,7 +2704,7 @@ static void init_signals(void)
{
/* Change limits so that we will get a core file */
STRUCT_RLIMIT rl;
- rl.rlim_cur = rl.rlim_max = RLIM_INFINITY;
+ rl.rlim_cur = rl.rlim_max = (rlim_t) RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings)
sql_print_warning("setrlimit could not change the size of core files to 'infinity'; We may not be able to generate a core file on signals");
}
=== modified file 'sql/rpl_record.cc'
--- a/sql/rpl_record.cc 2009-10-22 00:15:45 +0000
+++ b/sql/rpl_record.cc 2010-01-28 11:35:10 +0000
@@ -366,7 +366,6 @@ int prepare_record(TABLE *const table,
*/
for (Field **field_ptr= table->field+skip; *field_ptr; ++field_ptr)
{
- uint32 const mask= NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG;
Field *const f= *field_ptr;
if ((f->flags & NO_DEFAULT_VALUE_FLAG) &&
(f->real_type() != MYSQL_TYPE_ENUM))
=== modified file 'storage/maria/ft_maria.c'
--- a/storage/maria/ft_maria.c 2007-07-02 17:45:15 +0000
+++ b/storage/maria/ft_maria.c 2010-01-27 21:53:08 +0000
@@ -22,8 +22,8 @@
#include "ma_ftdefs.h"
FT_INFO *maria_ft_init_search(uint flags, void *info, uint keynr,
- uchar *query, uint query_len, CHARSET_INFO *cs,
- uchar *record)
+ uchar *query, size_t query_len,
+ CHARSET_INFO *cs, uchar *record)
{
FT_INFO *res;
if (flags & FT_BOOL)
=== modified file 'storage/maria/ma_blockrec.c'
--- a/storage/maria/ma_blockrec.c 2010-01-06 21:27:53 +0000
+++ b/storage/maria/ma_blockrec.c 2010-01-28 11:35:10 +0000
@@ -1688,7 +1688,8 @@ static my_bool get_head_or_tail_page(MAR
if (!page_link.changed)
goto crashed;
- DBUG_ASSERT((res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type);
+ DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) ==
+ page_type);
if (!(dir= find_free_position(page_type == HEAD_PAGE ? info : 0,
res->buff, block_size, &res->rownr,
&res->length, &res->empty_space)))
=== modified file 'storage/myisam/ft_boolean_search.c'
--- a/storage/myisam/ft_boolean_search.c 2010-01-15 15:27:55 +0000
+++ b/storage/myisam/ft_boolean_search.c 2010-01-27 21:53:08 +0000
@@ -299,7 +299,7 @@ static int ftb_parse_query_internal(MYSQ
}
-static int _ftb_parse_query(FTB *ftb, uchar *query, uint len,
+static int _ftb_parse_query(FTB *ftb, uchar *query, mysql_ft_size_t len,
struct st_mysql_ftparser *parser)
{
MYSQL_FTPARSER_PARAM *param;
@@ -540,7 +540,7 @@ static void _ftb_init_index_search(FT_IN
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query,
- uint query_len, CHARSET_INFO *cs)
+ mysql_ft_size_t query_len, CHARSET_INFO *cs)
{
FTB *ftb;
FTB_EXPR *ftbe;
@@ -679,8 +679,9 @@ static int ftb_check_phrase_internal(MYS
-1 is returned if error occurs.
*/
-static int _ftb_check_phrase(FTB *ftb, const uchar *document, uint len,
- FTB_EXPR *ftbe, struct st_mysql_ftparser *parser)
+static int _ftb_check_phrase(FTB *ftb, const uchar *document,
+ mysql_ft_size_t len,
+ FTB_EXPR *ftbe, struct st_mysql_ftparser *parser)
{
MY_FTB_PHRASE_PARAM ftb_param;
MYSQL_FTPARSER_PARAM *param;
=== modified file 'storage/myisam/ft_myisam.c'
--- a/storage/myisam/ft_myisam.c 2007-07-02 17:45:15 +0000
+++ b/storage/myisam/ft_myisam.c 2010-01-27 21:53:08 +0000
@@ -23,8 +23,8 @@
#include "ftdefs.h"
FT_INFO *ft_init_search(uint flags, void *info, uint keynr,
- uchar *query, uint query_len, CHARSET_INFO *cs,
- uchar *record)
+ uchar *query, size_t query_len,
+ CHARSET_INFO *cs, uchar *record)
{
FT_INFO *res;
if (flags & FT_BOOL)
=== modified file 'storage/myisam/ft_nlq_search.c'
--- a/storage/myisam/ft_nlq_search.c 2009-11-30 13:36:06 +0000
+++ b/storage/myisam/ft_nlq_search.c 2010-01-27 21:53:08 +0000
@@ -204,7 +204,8 @@ static int FT_DOC_cmp(void *unused __att
FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query,
- uint query_len, uint flags, uchar *record)
+ mysql_ft_size_t query_len, uint flags,
+ uchar *record)
{
TREE wtree;
ALL_IN_ONE aio;
=== modified file 'storage/myisam/ft_parser.c'
--- a/storage/myisam/ft_parser.c 2009-11-30 13:36:06 +0000
+++ b/storage/myisam/ft_parser.c 2010-01-27 21:53:08 +0000
@@ -304,7 +304,7 @@ static int ft_parse_internal(MYSQL_FTPAR
}
-int ft_parse(TREE *wtree, const uchar *doc, int doclen,
+int ft_parse(TREE *wtree, const uchar *doc, mysql_ft_size_t doclen,
struct st_mysql_ftparser *parser,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
=== modified file 'storage/myisam/ft_stopwords.c'
--- a/storage/myisam/ft_stopwords.c 2009-11-29 23:08:56 +0000
+++ b/storage/myisam/ft_stopwords.c 2010-01-27 21:53:08 +0000
@@ -21,7 +21,7 @@
typedef struct st_ft_stopwords
{
const char * pos;
- uint len;
+ size_t len;
} FT_STOPWORD;
static TREE *stopwords3=NULL;
=== modified file 'storage/myisam/ftdefs.h'
--- a/storage/myisam/ftdefs.h 2009-11-29 23:08:56 +0000
+++ b/storage/myisam/ftdefs.h 2010-01-27 21:53:08 +0000
@@ -97,8 +97,8 @@
typedef struct st_ft_word {
const uchar *pos;
- uint len;
double weight;
+ size_t len;
} FT_WORD;
int is_stopword(const uchar *word, size_t len);
@@ -111,7 +111,8 @@ uchar ft_simple_get_word(CHARSET_INFO *,
FT_WORD *, my_bool);
typedef struct _st_ft_seg_iterator {
- uint num, len;
+ uint num;
+ mysql_ft_size_t len;
HA_KEYSEG *seg;
const uchar *rec, *pos;
} FT_SEG_ITERATOR;
@@ -128,8 +129,9 @@ FT_WORD * _mi_ft_parserecord(MI_INFO *,
uint _mi_ft_parse(TREE *, MI_INFO *, uint, const uchar *,
MYSQL_FTPARSER_PARAM *, MEM_ROOT *);
-FT_INFO *ft_init_nlq_search(MI_INFO *, uint, uchar *, uint, uint, uchar *);
-FT_INFO *ft_init_boolean_search(MI_INFO *, uint, uchar *, uint, CHARSET_INFO *);
+FT_INFO *ft_init_nlq_search(MI_INFO *, uint, uchar *, mysql_ft_size_t, uint,
+ uchar *);
+FT_INFO *ft_init_boolean_search(MI_INFO *, uint, uchar *, mysql_ft_size_t, CHARSET_INFO *);
extern const struct _ft_vft _ft_vft_nlq;
int ft_nlq_read_next(FT_INFO *, char *);
=== modified file 'storage/xtradb/buf/buf0buf.c'
--- a/storage/xtradb/buf/buf0buf.c 2010-01-06 12:00:14 +0000
+++ b/storage/xtradb/buf/buf0buf.c 2010-01-28 11:35:10 +0000
@@ -76,10 +76,10 @@ inline void _increment_page_get_statisti
block->page.offset, DPAH_SIZE << 3);
block_hash_byte = block_hash >> 3;
block_hash_offset = (byte) block_hash & 0x07;
- if (block_hash_byte < 0 || block_hash_byte >= DPAH_SIZE)
- fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", block_hash_byte, block_hash_offset);
- if (block_hash_offset < 0 || block_hash_offset > 7)
- fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", block_hash_byte, block_hash_offset);
+ if (block_hash_byte >= DPAH_SIZE)
+ fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", (unsigned long) block_hash_byte, (unsigned long) block_hash_offset);
+ if (block_hash_offset > 7)
+ fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", (unsigned long) block_hash_byte, (unsigned long) block_hash_offset);
if ((trx->distinct_page_access_hash[block_hash_byte] & ((byte) 0x01 << block_hash_offset)) == 0)
trx->distinct_page_access++;
trx->distinct_page_access_hash[block_hash_byte] |= (byte) 0x01 << block_hash_offset;
=== modified file 'storage/xtradb/handler/i_s.cc'
--- a/storage/xtradb/handler/i_s.cc 2010-01-15 15:58:25 +0000
+++ b/storage/xtradb/handler/i_s.cc 2010-01-28 11:35:10 +0000
@@ -2992,7 +2992,7 @@ i_s_innodb_admin_command_fill(
char** query_str;
char* ptr;
char quote = '\0';
- char* command_head = "XTRA_";
+ const char* command_head = "XTRA_";
DBUG_ENTER("i_s_innodb_admin_command_fill");
=== modified file 'support-files/compiler_warnings.supp'
--- a/support-files/compiler_warnings.supp 2010-01-06 21:27:53 +0000
+++ b/support-files/compiler_warnings.supp 2010-01-28 11:35:10 +0000
@@ -28,6 +28,12 @@ pars0lex.l: .*conversion from 'ulint' to
btr/btr0cur\.c: .*value computed is not used.*: 3175-3375
include/buf0buf\.ic: unused parameter ���mtr���
fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199
+fil/fil0fil\.c: unused parameter
+log/log0recv\.c: unused variable
+os/os0file\.c: unused parameter
+handler/i_s\.cc: unused variable
+sync/sync0rw\.c: unused parameter
+sync/sync0sync\.c: unused parameter
#
# bdb is not critical to keep up to date
@@ -50,6 +56,11 @@ db_vrfy.c : .*comparison is always false
.*/extra/libevent/select\.c : .*comparison between signed and unsigned.* : 270-280
#
+# Ignore warnings from system libraries
+#
+/usr/share/aclocal/audiofile.m4 : .*
+
+#
# Ignore all conversion warnings on windows 64
# (Is safe as we are not yet supporting strings >= 2G)
#
@@ -102,6 +113,8 @@ include/runtime.hpp: .*pure_error.*
#
listener.cc : .*conversion from 'SOCKET' to 'int'.*
net_serv.cc : .*conversion from 'SOCKET' to 'int'.*
+set_var.cc: right-hand operand of comma has no effect : 1000-1400
+
# allow a little moving space for the warning below
mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2804)
by knielsenï¼ knielsen-hq.org 28 Jan '10
by knielsenï¼ knielsen-hq.org 28 Jan '10
28 Jan '10
#At lp:maria
2804 knielsen(a)knielsen-hq.org 2010-01-28 [merge]
automerge windows fixes.
added:
mysql-test/t/mysqlbinlog2-master.opt
mysql-test/t/mysqlbinlog_row-master.opt
mysql-test/t/mysqlbinlog_row_innodb-master.opt
mysql-test/t/mysqlbinlog_row_myisam-master.opt
mysql-test/t/mysqlbinlog_row_trans-master.opt
modified:
mysql-test/include/ps_conv.inc
mysql-test/mysql-test-run.pl
mysql-test/suite/binlog/r/binlog_unsafe.result
mysql-test/suite/binlog/t/binlog_unsafe.test
mysql-test/suite/maria/r/maria-recover.result
mysql-test/suite/maria/t/maria-recover.test
mysql-test/suite/parts/inc/partition_timestamp.inc
mysql-test/suite/parts/r/partition_recover_myisam.result
mysql-test/suite/parts/t/partition_recover_myisam.test
mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test
=== modified file 'mysql-test/include/ps_conv.inc'
--- a/mysql-test/include/ps_conv.inc 2007-07-04 09:20:53 +0000
+++ b/mysql-test/include/ps_conv.inc 2010-01-19 10:36:52 +0000
@@ -30,6 +30,9 @@
--disable_warnings
drop table if exists t5 ;
--enable_warnings
+--disable_query_log
+SET TIME_ZONE= '+03:00';
+--enable_query_log
set @arg01= 8;
set @arg02= 8.0;
set @arg03= 80.00000000000e-1;
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2010-01-06 21:27:53 +0000
+++ b/mysql-test/mysql-test-run.pl 2010-01-27 17:41:05 +0000
@@ -3425,7 +3425,7 @@ sub restart_forced_by_test
# Return timezone value of tinfo or default value
sub timezone {
my ($tinfo)= @_;
- return $tinfo->{timezone} || "GMT-3";
+ return $tinfo->{timezone} || "DEFAULT";
}
@@ -3455,7 +3455,11 @@ sub run_testcase ($$) {
# Init variables that can change between each test case
# -------------------------------------------------------
my $timezone= timezone($tinfo);
- $ENV{'TZ'}= $timezone;
+ if ($timezone ne 'DEFAULT') {
+ $ENV{'TZ'}= $timezone;
+ } else {
+ delete($ENV{'TZ'});
+ }
mtr_verbose("Setting timezone: $timezone");
if ( ! using_extern() )
=== modified file 'mysql-test/suite/binlog/r/binlog_unsafe.result'
--- a/mysql-test/suite/binlog/r/binlog_unsafe.result 2010-01-15 15:27:55 +0000
+++ b/mysql-test/suite/binlog/r/binlog_unsafe.result 2010-01-19 10:36:52 +0000
@@ -380,6 +380,7 @@ INSERT INTO t1 VALUES (VERSION());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
DELETE FROM t1;
+SET TIME_ZONE= '+03:00';
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
(CURDATE()),
=== modified file 'mysql-test/suite/binlog/t/binlog_unsafe.test'
--- a/mysql-test/suite/binlog/t/binlog_unsafe.test 2010-01-15 15:27:55 +0000
+++ b/mysql-test/suite/binlog/t/binlog_unsafe.test 2010-01-19 10:36:52 +0000
@@ -422,6 +422,7 @@ DELETE FROM t1;
# following following functions depend on the TIMESTAMP variable and
# don't generate a warning.
+SET TIME_ZONE= '+03:00';
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
(CURDATE()),
=== modified file 'mysql-test/suite/maria/r/maria-recover.result'
--- a/mysql-test/suite/maria/r/maria-recover.result 2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/r/maria-recover.result 2010-01-27 17:41:05 +0000
@@ -1,6 +1,3 @@
-call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired");
select @@global.maria_recover;
@@global.maria_recover
BACKUP
=== modified file 'mysql-test/suite/maria/t/maria-recover.test'
--- a/mysql-test/suite/maria/t/maria-recover.test 2009-10-09 08:09:24 +0000
+++ b/mysql-test/suite/maria/t/maria-recover.test 2010-01-27 17:41:05 +0000
@@ -2,9 +2,13 @@
--source include/have_maria.inc
-call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired");
+--disable_query_log
+# Note: \\. matches a single period. We use '.' as directory separator to
+# account for Unix and Windows variation.
+call mtr.add_suppression("Checking table: '\\..mysqltest.t_corrupted2'");
+call mtr.add_suppression("Recovering table: '\\..mysqltest.t_corrupted2'");
+call mtr.add_suppression("Table '\\..mysqltest.t_corrupted2' is marked as crashed and should be repaired");
+--enable_query_log
# Note: we're setting an environment variable (not prefixing it by $),
# so that the perl code below can access it.
=== modified file 'mysql-test/suite/parts/inc/partition_timestamp.inc'
--- a/mysql-test/suite/parts/inc/partition_timestamp.inc 2009-10-28 07:52:34 +0000
+++ b/mysql-test/suite/parts/inc/partition_timestamp.inc 2010-01-27 17:41:05 +0000
@@ -48,6 +48,7 @@ show create table t3;
let $count=12;
--echo $count inserts;
--disable_query_log
+SET TIME_ZONE= '+03:00';
begin;
while ($count)
{
=== modified file 'mysql-test/suite/parts/r/partition_recover_myisam.result'
--- a/mysql-test/suite/parts/r/partition_recover_myisam.result 2009-08-29 21:29:47 +0000
+++ b/mysql-test/suite/parts/r/partition_recover_myisam.result 2010-01-27 17:41:05 +0000
@@ -1,5 +1,3 @@
-call mtr.add_suppression("./test/t1_will_crash");
-call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;
=== modified file 'mysql-test/suite/parts/t/partition_recover_myisam.test'
--- a/mysql-test/suite/parts/t/partition_recover_myisam.test 2009-12-03 11:19:05 +0000
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.test 2010-01-27 17:41:05 +0000
@@ -1,7 +1,9 @@
# test the auto-recover (--myisam-recover) of partitioned myisam tables
-call mtr.add_suppression("./test/t1_will_crash");
+--disable_query_log
+call mtr.add_suppression("..test.t1_will_crash");
call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
+--enable_query_log
--source include/have_partition.inc
--disable_warnings
=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result 2008-11-04 17:07:14 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result 2010-01-19 10:36:52 +0000
@@ -18,6 +18,7 @@ Server_id Host Port Rpl_recovery_rank Ma
drop table t1;
stop slave;
create table t2(id int auto_increment primary key, created datetime);
+SET TIME_ZONE= '+03:00';
set timestamp=12345;
insert into t2 set created=now();
select * from t2;
=== modified file 'mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test'
--- a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test 2010-01-19 10:36:52 +0000
@@ -23,6 +23,7 @@ connection master;
# Test replication of timestamp
create table t2(id int auto_increment primary key, created datetime);
+SET TIME_ZONE= '+03:00';
set timestamp=12345;
insert into t2 set created=now();
select * from t2;
=== added file 'mysql-test/t/mysqlbinlog2-master.opt'
--- a/mysql-test/t/mysqlbinlog2-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysqlbinlog2-master.opt 2010-01-19 10:36:52 +0000
@@ -0,0 +1 @@
+--timezone=GMT-3
=== added file 'mysql-test/t/mysqlbinlog_row-master.opt'
--- a/mysql-test/t/mysqlbinlog_row-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysqlbinlog_row-master.opt 2010-01-27 17:41:05 +0000
@@ -0,0 +1 @@
+--timezone=GMT-3
=== added file 'mysql-test/t/mysqlbinlog_row_innodb-master.opt'
--- a/mysql-test/t/mysqlbinlog_row_innodb-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysqlbinlog_row_innodb-master.opt 2010-01-27 17:41:05 +0000
@@ -0,0 +1 @@
+--timezone=GMT-3
=== added file 'mysql-test/t/mysqlbinlog_row_myisam-master.opt'
--- a/mysql-test/t/mysqlbinlog_row_myisam-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysqlbinlog_row_myisam-master.opt 2010-01-27 17:41:05 +0000
@@ -0,0 +1 @@
+--timezone=GMT-3
=== added file 'mysql-test/t/mysqlbinlog_row_trans-master.opt'
--- a/mysql-test/t/mysqlbinlog_row_trans-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysqlbinlog_row_trans-master.opt 2010-01-27 17:41:05 +0000
@@ -0,0 +1 @@
+--timezone=GMT-3
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2803)
by Michael Widenius 27 Jan '10
by Michael Widenius 27 Jan '10
27 Jan '10
#At lp:maria based on revid:hakan@askmonty.org-20100122211921-e177xzarwy7l8j5y
2803 Michael Widenius 2010-01-27
Fixed some compiler warnings and errors in test suite found by buildbot
modified:
include/ft_global.h
include/maria.h
mysql-test/r/show_check.result
mysql-test/suite/rpl/t/rpl_rotate_logs.test
mysql-test/t/show_check-master.opt
sql/item.cc
storage/maria/ft_maria.c
storage/myisam/ft_boolean_search.c
storage/myisam/ft_myisam.c
storage/myisam/ft_nlq_search.c
storage/myisam/ft_parser.c
storage/myisam/ft_stopwords.c
storage/myisam/ftdefs.h
per-file messages:
include/ft_global.h
Changed string size to 'size_t' (to avoid compiler warnings later)
include/maria.h
Changed string size to 'size_t' (to avoid compiler warnings later)
mysql-test/r/show_check.result
Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables'
mysql-test/suite/rpl/t/rpl_rotate_logs.test
Use HIGH_PRIORITY inserts to avoid problem with concurrent inserts on the slave.
mysql-test/t/show_check-master.opt
Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables'
sql/item.cc
Fixed compiler warning
storage/maria/ft_maria.c
Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_boolean_search.c
Fixed compiler warnings
storage/myisam/ft_myisam.c
Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_nlq_search.c
Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_parser.c
Changed string size to 'size_t' (to avoid compiler warnings)
storage/myisam/ft_stopwords.c
Changed string size to 'size_t' (to avoid compiler warnings)
storage/myisam/ftdefs.h
Changed string size to 'size_t' (to avoid compiler warnings)
=== modified file 'include/ft_global.h'
--- a/include/ft_global.h 2009-11-30 13:36:06 +0000
+++ b/include/ft_global.h 2010-01-27 21:53:08 +0000
@@ -62,7 +62,8 @@ void ft_free_stopwords(void);
#define FT_SORTED 2
#define FT_EXPAND 4 /* query expansion */
-FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,CHARSET_INFO *, uchar *);
+FT_INFO *ft_init_search(uint,void *, uint, uchar *, size_t,
+ CHARSET_INFO *, uchar *);
my_bool ft_boolean_check_syntax_string(const uchar *);
/* Internal symbols for fulltext between maria and MyISAM */
=== modified file 'include/maria.h'
--- a/include/maria.h 2009-02-19 09:01:25 +0000
+++ b/include/maria.h 2010-01-27 21:53:08 +0000
@@ -462,7 +462,7 @@ void maria_versioning(MARIA_HA *info, my
void maria_ignore_trids(MARIA_HA *info);
/* fulltext functions */
-FT_INFO *maria_ft_init_search(uint,void *, uint, uchar *, uint,
+FT_INFO *maria_ft_init_search(uint,void *, uint, uchar *, size_t,
CHARSET_INFO *, uchar *);
/* 'Almost-internal' Maria functions */
=== modified file 'mysql-test/r/show_check.result'
--- a/mysql-test/r/show_check.result 2009-12-15 09:03:24 +0000
+++ b/mysql-test/r/show_check.result 2010-01-27 21:53:08 +0000
@@ -252,13 +252,11 @@ drop table t1;
flush tables;
show open tables;
Database Table In_use Name_locked
-mysql general_log 0 0
create table t1(n int);
insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
test t1 0 0
-mysql general_log 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
show create table t1;
=== modified file 'mysql-test/suite/rpl/t/rpl_rotate_logs.test'
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2009-03-12 09:48:41 +0000
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2010-01-27 21:53:08 +0000
@@ -153,7 +153,7 @@ disable_query_log;
while ($1)
{
#eval means expand $ expressions
- eval insert into t3 values($1 + 4);
+ eval insert HIGH_PRIORITY into t3 values($1 + 4);
dec $1;
}
enable_query_log;
=== modified file 'mysql-test/t/show_check-master.opt'
--- a/mysql-test/t/show_check-master.opt 2009-12-03 11:19:05 +0000
+++ b/mysql-test/t/show_check-master.opt 2010-01-27 21:53:08 +0000
@@ -1 +1 @@
---log-output=table --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="" --slow-query-log-file=""
+--log-output=file --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="foo" --slow-query-log-file=""
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2010-01-15 15:27:55 +0000
+++ b/sql/item.cc 2010-01-27 21:53:08 +0000
@@ -7119,7 +7119,7 @@ double Item_cache_decimal::val_real()
DBUG_ASSERT(fixed);
double res;
if (!value_cached && !cache_value())
- return NULL;
+ return 0.0;
my_decimal2double(E_DEC_FATAL_ERROR, &decimal_value, &res);
return res;
}
=== modified file 'storage/maria/ft_maria.c'
--- a/storage/maria/ft_maria.c 2007-07-02 17:45:15 +0000
+++ b/storage/maria/ft_maria.c 2010-01-27 21:53:08 +0000
@@ -22,8 +22,8 @@
#include "ma_ftdefs.h"
FT_INFO *maria_ft_init_search(uint flags, void *info, uint keynr,
- uchar *query, uint query_len, CHARSET_INFO *cs,
- uchar *record)
+ uchar *query, size_t query_len,
+ CHARSET_INFO *cs, uchar *record)
{
FT_INFO *res;
if (flags & FT_BOOL)
=== modified file 'storage/myisam/ft_boolean_search.c'
--- a/storage/myisam/ft_boolean_search.c 2010-01-15 15:27:55 +0000
+++ b/storage/myisam/ft_boolean_search.c 2010-01-27 21:53:08 +0000
@@ -299,7 +299,7 @@ static int ftb_parse_query_internal(MYSQ
}
-static int _ftb_parse_query(FTB *ftb, uchar *query, uint len,
+static int _ftb_parse_query(FTB *ftb, uchar *query, mysql_ft_size_t len,
struct st_mysql_ftparser *parser)
{
MYSQL_FTPARSER_PARAM *param;
@@ -540,7 +540,7 @@ static void _ftb_init_index_search(FT_IN
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query,
- uint query_len, CHARSET_INFO *cs)
+ mysql_ft_size_t query_len, CHARSET_INFO *cs)
{
FTB *ftb;
FTB_EXPR *ftbe;
@@ -679,8 +679,9 @@ static int ftb_check_phrase_internal(MYS
-1 is returned if error occurs.
*/
-static int _ftb_check_phrase(FTB *ftb, const uchar *document, uint len,
- FTB_EXPR *ftbe, struct st_mysql_ftparser *parser)
+static int _ftb_check_phrase(FTB *ftb, const uchar *document,
+ mysql_ft_size_t len,
+ FTB_EXPR *ftbe, struct st_mysql_ftparser *parser)
{
MY_FTB_PHRASE_PARAM ftb_param;
MYSQL_FTPARSER_PARAM *param;
=== modified file 'storage/myisam/ft_myisam.c'
--- a/storage/myisam/ft_myisam.c 2007-07-02 17:45:15 +0000
+++ b/storage/myisam/ft_myisam.c 2010-01-27 21:53:08 +0000
@@ -23,8 +23,8 @@
#include "ftdefs.h"
FT_INFO *ft_init_search(uint flags, void *info, uint keynr,
- uchar *query, uint query_len, CHARSET_INFO *cs,
- uchar *record)
+ uchar *query, size_t query_len,
+ CHARSET_INFO *cs, uchar *record)
{
FT_INFO *res;
if (flags & FT_BOOL)
=== modified file 'storage/myisam/ft_nlq_search.c'
--- a/storage/myisam/ft_nlq_search.c 2009-11-30 13:36:06 +0000
+++ b/storage/myisam/ft_nlq_search.c 2010-01-27 21:53:08 +0000
@@ -204,7 +204,8 @@ static int FT_DOC_cmp(void *unused __att
FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query,
- uint query_len, uint flags, uchar *record)
+ mysql_ft_size_t query_len, uint flags,
+ uchar *record)
{
TREE wtree;
ALL_IN_ONE aio;
=== modified file 'storage/myisam/ft_parser.c'
--- a/storage/myisam/ft_parser.c 2009-11-30 13:36:06 +0000
+++ b/storage/myisam/ft_parser.c 2010-01-27 21:53:08 +0000
@@ -304,7 +304,7 @@ static int ft_parse_internal(MYSQL_FTPAR
}
-int ft_parse(TREE *wtree, const uchar *doc, int doclen,
+int ft_parse(TREE *wtree, const uchar *doc, mysql_ft_size_t doclen,
struct st_mysql_ftparser *parser,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
=== modified file 'storage/myisam/ft_stopwords.c'
--- a/storage/myisam/ft_stopwords.c 2009-11-29 23:08:56 +0000
+++ b/storage/myisam/ft_stopwords.c 2010-01-27 21:53:08 +0000
@@ -21,7 +21,7 @@
typedef struct st_ft_stopwords
{
const char * pos;
- uint len;
+ size_t len;
} FT_STOPWORD;
static TREE *stopwords3=NULL;
=== modified file 'storage/myisam/ftdefs.h'
--- a/storage/myisam/ftdefs.h 2009-11-29 23:08:56 +0000
+++ b/storage/myisam/ftdefs.h 2010-01-27 21:53:08 +0000
@@ -97,8 +97,8 @@
typedef struct st_ft_word {
const uchar *pos;
- uint len;
double weight;
+ size_t len;
} FT_WORD;
int is_stopword(const uchar *word, size_t len);
@@ -111,7 +111,8 @@ uchar ft_simple_get_word(CHARSET_INFO *,
FT_WORD *, my_bool);
typedef struct _st_ft_seg_iterator {
- uint num, len;
+ uint num;
+ mysql_ft_size_t len;
HA_KEYSEG *seg;
const uchar *rec, *pos;
} FT_SEG_ITERATOR;
@@ -128,8 +129,9 @@ FT_WORD * _mi_ft_parserecord(MI_INFO *,
uint _mi_ft_parse(TREE *, MI_INFO *, uint, const uchar *,
MYSQL_FTPARSER_PARAM *, MEM_ROOT *);
-FT_INFO *ft_init_nlq_search(MI_INFO *, uint, uchar *, uint, uint, uchar *);
-FT_INFO *ft_init_boolean_search(MI_INFO *, uint, uchar *, uint, CHARSET_INFO *);
+FT_INFO *ft_init_nlq_search(MI_INFO *, uint, uchar *, mysql_ft_size_t, uint,
+ uchar *);
+FT_INFO *ft_init_boolean_search(MI_INFO *, uint, uchar *, mysql_ft_size_t, CHARSET_INFO *);
extern const struct _ft_vft _ft_vft_nlq;
int ft_nlq_read_next(FT_INFO *, char *);
1
0