List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:August 2 2010 7:49am
Subject:bzr push into mysql-5.0 branch (Georgi.Kodinov:2877 to 2882)
View as plain text  
 2882 Georgi Kodinov	2010-08-02
      tree name update

    modified:
      .bzr-mysql/default.conf
 2881 Georgi Kodinov	2010-08-02 [merge]
      merge

    modified:
      sql/sql_prepare.cc
 2880 Georgi Kodinov	2010-07-21 [merge]
      merge

    modified:
      innobase/row/row0mysql.c
      sql/opt_range.cc
 2879 Georgi Kodinov	2010-07-02
      merge

    modified:
      .bzr-mysql/default.conf
 2878 Georgi Kodinov	2010-07-02 [merge]
      merge

 2877 Georgi Kodinov	2010-07-02 [merge]
      merge

=== modified file 'config/ac-macros/yassl.m4'
--- a/config/ac-macros/yassl.m4	2006-09-21 09:37:08 +0000
+++ b/config/ac-macros/yassl.m4	2010-06-08 13:36:47 +0000
@@ -32,6 +32,12 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
         ;;
     esac
     AC_SUBST([yassl_taocrypt_extra_cxxflags])
+    # Thread safe check
+    yassl_thread_cxxflags=""
+    if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"; then
+      yassl_thread_cxxflags="-DYASSL_THREAD_SAFE"
+    fi
+    AC_SUBST([yassl_thread_cxxflags])
     # Link extra/yassl/include/openssl subdir to include/
     yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
     AC_SUBST(yassl_h_ln_cmd)

=== modified file 'extra/yassl/CMakeLists.txt'
--- a/extra/yassl/CMakeLists.txt	2007-08-03 19:51:37 +0000
+++ b/extra/yassl/CMakeLists.txt	2010-06-08 13:36:47 +0000
@@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/
                     ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
                     ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
 
-ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX")
+ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX -DYASSL_THREAD_SAFE")
 
 SET(YASSL_SOURCES  src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp 
 				src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp 

=== modified file 'extra/yassl/certs/ca-cert.pem'
--- a/extra/yassl/certs/ca-cert.pem	2006-05-03 11:08:24 +0000
+++ b/extra/yassl/certs/ca-cert.pem	2010-06-08 13:36:47 +0000
@@ -5,49 +5,49 @@ Certificate:
         Signature Algorithm: md5WithRSAEncryption
         Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@stripped
         Validity
-            Not Before: Jan 18 20:12:32 2005 GMT
-            Not After : Oct 15 20:12:32 2007 GMT
+            Not Before: Mar  7 03:10:11 2005 GMT
+            Not After : Apr  1 03:10:11 2046 GMT
         Subject: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@stripped
         Subject Public Key Info:
             Public Key Algorithm: rsaEncryption
             RSA Public Key: (512 bit)
                 Modulus (512 bit):
-                    00:cf:2b:14:00:b0:3c:df:6f:9e:91:40:ec:c8:f6:
-                    90:b2:5b:b4:70:80:a5:a4:0a:73:c7:44:f3:2a:26:
-                    c4:2f:f1:3a:f1:c3:c4:ac:fc:c3:d2:c3:bf:f5:d7:
-                    6a:38:42:ad:22:ab:c8:c4:4b:4c:1d:16:af:05:34:
-                    7d:79:97:5e:e1
+                    00:ef:c1:e3:9a:3c:6e:6e:cb:26:6f:05:be:e0:cb:
+                    57:a0:4b:68:e6:1b:f9:95:db:01:92:aa:6e:a6:b5:
+                    2d:b1:2b:50:fd:db:13:f2:c5:d8:b8:4f:75:28:53:
+                    72:e8:e5:11:9d:bb:c3:4f:4f:09:fd:4c:e7:46:d5:
+                    1d:bb:35:02:af
                 Exponent: 65537 (0x10001)
         X509v3 extensions:
             X509v3 Subject Key Identifier: 
-                CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84
+                1D:EF:A1:B8:81:78:12:47:E8:57:06:08:74:18:F7:D3:AA:D8:F7:BD
             X509v3 Authority Key Identifier: 
-                keyid:CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84
+                keyid:1D:EF:A1:B8:81:78:12:47:E8:57:06:08:74:18:F7:D3:AA:D8:F7:BD
                 DirName:/C=US/ST=Oregon/L=Portland/O=sawtooth/CN=www.sawtooth-consulting.com/emailAddress=info@stripped
                 serial:00
 
             X509v3 Basic Constraints: 
                 CA:TRUE
     Signature Algorithm: md5WithRSAEncryption
-        27:f7:3d:fb:39:6f:73:a4:86:f3:a0:48:22:60:84:e9:5c:3d:
-        28:36:05:16:44:98:07:87:e1:5d:b5:f3:a7:bc:33:5f:f4:29:
-        a9:5f:87:33:df:e6:8e:bd:e2:f3:0a:c8:00:69:ae:3d:41:47:
-        03:ea:0b:4c:67:45:4b:ab:f3:39
+        d9:77:e3:07:d9:2e:ec:2f:9b:8e:9e:ca:b4:00:0b:ef:c7:74:
+        cb:f4:f6:44:2f:02:75:17:a5:74:3e:26:b2:26:fd:1f:ab:3a:
+        df:d5:e3:05:14:08:d0:8c:1d:c9:3e:e1:59:6f:b3:38:5d:af:
+        78:60:e3:c5:6a:69:96:80:7d:00
 -----BEGIN CERTIFICATE-----
 MIIC7zCCApmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiTELMAkGA1UEBhMCVVMx
 DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxETAPBgNVBAoTCHNh
 d3Rvb3RoMSQwIgYDVQQDExt3d3cuc2F3dG9vdGgtY29uc3VsdGluZy5jb20xHTAb
-BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDExODIwMTIzMloXDTA3
-MTAxNTIwMTIzMlowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
+BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDMwNzAzMTAxMVoXDTQ2
+MDQwMTAzMTAxMVowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP
 BgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290aDEkMCIGA1UEAxMbd3d3
 LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlh
-c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDPKxQAsDzfb56RQOzI9pCy
-W7RwgKWkCnPHRPMqJsQv8Trxw8Ss/MPSw7/112o4Qq0iq8jES0wdFq8FNH15l17h
-AgMBAAGjgekwgeYwHQYDVR0OBBYEFMsPH+midnHJ5ugjpsEYt8xEz7mEMIG2BgNV
-HSMEga4wgauAFMsPH+midnHJ5ugjpsEYt8xEz7mEoYGPpIGMMIGJMQswCQYDVQQG
+c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDvweOaPG5uyyZvBb7gy1eg
+S2jmG/mV2wGSqm6mtS2xK1D92xPyxdi4T3UoU3Lo5RGdu8NPTwn9TOdG1R27NQKv
+AgMBAAGjgekwgeYwHQYDVR0OBBYEFB3vobiBeBJH6FcGCHQY99Oq2Pe9MIG2BgNV
+HSMEga4wgauAFB3vobiBeBJH6FcGCHQY99Oq2Pe9oYGPpIGMMIGJMQswCQYDVQQG
 EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDERMA8GA1UE
 ChMIc2F3dG9vdGgxJDAiBgNVBAMTG3d3dy5zYXd0b290aC1jb25zdWx0aW5nLmNv
 bTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb22CAQAwDAYDVR0TBAUwAwEB
-/zANBgkqhkiG9w0BAQQFAANBACf3Pfs5b3OkhvOgSCJghOlcPSg2BRZEmAeH4V21
-86e8M1/0KalfhzPf5o694vMKyABprj1BRwPqC0xnRUur8zk=
+/zANBgkqhkiG9w0BAQQFAANBANl34wfZLuwvm46eyrQAC+/HdMv09kQvAnUXpXQ+
+JrIm/R+rOt/V4wUUCNCMHck+4Vlvszhdr3hg48VqaZaAfQA=
 -----END CERTIFICATE-----

=== modified file 'extra/yassl/certs/client-cert.der'
Binary files a/extra/yassl/certs/client-cert.der	2006-05-03 11:20:51 +0000 and b/extra/yassl/certs/client-cert.der	2010-06-08 13:36:47 +0000 differ

=== modified file 'extra/yassl/certs/client-cert.pem'
--- a/extra/yassl/certs/client-cert.pem	2006-05-03 11:08:24 +0000
+++ b/extra/yassl/certs/client-cert.pem	2010-06-08 13:36:47 +0000
@@ -5,8 +5,8 @@ Certificate:
         Signature Algorithm: md5WithRSAEncryption
         Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@stripped
         Validity
-            Not Before: Jan 18 19:33:15 2005 GMT
-            Not After : Oct 15 19:33:15 2007 GMT
+            Not Before: Mar  7 03:00:31 2005 GMT
+            Not After : Apr  1 03:00:31 2046 GMT
         Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@stripped
         Subject Public Key Info:
             Public Key Algorithm: rsaEncryption
@@ -29,15 +29,15 @@ Certificate:
             X509v3 Basic Constraints: 
                 CA:TRUE
     Signature Algorithm: md5WithRSAEncryption
-        c5:82:26:0c:1f:61:01:14:b0:ce:18:99:64:91:0e:f1:f8:90:
-        3e:a3:0e:be:38:7c:97:ba:05:c9:2a:dc:dd:62:2d:12:61:79:
-        7a:86:b1:97:5d:1e:e8:f7:e8:32:34:f7:8f:b1:08:3d:13:71:
-        a6:3c:15:91:85:12:35:6e:78:87
+        59:19:ae:1b:4e:65:9e:ca:f1:b8:3d:ff:c7:5e:15:86:10:97:
+        8c:3e:22:32:ab:4e:75:a7:70:83:f2:fb:2f:af:fe:26:28:e9:
+        4f:d4:c9:49:7c:6f:51:7e:2a:ff:a0:5b:25:45:2e:66:d9:0d:
+        92:94:e5:b8:60:c6:67:1a:f3:03
 -----BEGIN CERTIFICATE-----
 MIICtzCCAmGgAwIBAgIBADANBgkqhkiG9w0BAQQFADB4MQswCQYDVQQGEwJVUzEP
 MA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFT
 U0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9A
-eWFzc2wuY29tMB4XDTA1MDExODE5MzMxNVoXDTA3MTAxNTE5MzMxNVoweDELMAkG
+eWFzc2wuY29tMB4XDTA1MDMwNzAzMDAzMVoXDTQ2MDQwMTAzMDAzMVoweDELMAkG
 A1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxDjAM
 BgNVBAoTBXlhU1NMMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcN
 AQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDNH3hH
@@ -47,6 +47,6 @@ wP/OtbStMIGiBgNVHSMEgZowgZeAFK4lXvpNo1sr
 MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFu
 ZDEOMAwGA1UEChMFeWFTU0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkq
 hkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZI
-hvcNAQEEBQADQQDFgiYMH2EBFLDOGJlkkQ7x+JA+ow6+OHyXugXJKtzdYi0SYXl6
-hrGXXR7o9+gyNPePsQg9E3GmPBWRhRI1bniH
+hvcNAQEEBQADQQBZGa4bTmWeyvG4Pf/HXhWGEJeMPiIyq051p3CD8vsvr/4mKOlP
+1MlJfG9Rfir/oFslRS5m2Q2SlOW4YMZnGvMD
 -----END CERTIFICATE-----

=== modified file 'extra/yassl/certs/dsa-cert.pem'
--- a/extra/yassl/certs/dsa-cert.pem	2006-05-03 11:08:24 +0000
+++ b/extra/yassl/certs/dsa-cert.pem	2010-06-08 13:36:47 +0000
@@ -5,8 +5,8 @@ Certificate:
         Signature Algorithm: dsaWithSHA1
         Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@stripped
         Validity
-            Not Before: Jan 23 22:54:51 2005 GMT
-            Not After : Oct 20 22:54:51 2007 GMT
+            Not Before: Mar  7 03:22:00 2005 GMT
+            Not After : Apr  1 03:22:00 2046 GMT
         Subject: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@stripped
         Subject Public Key Info:
             Public Key Algorithm: dsaEncryption
@@ -43,14 +43,14 @@ Certificate:
             X509v3 Basic Constraints: 
                 CA:TRUE
     Signature Algorithm: dsaWithSHA1
-        30:2b:02:14:74:46:9f:91:7b:24:17:3b:ee:0f:10:e3:76:62:
-        f4:dc:81:e6:fd:fe:02:13:08:f4:87:0a:ab:ba:9c:de:3a:69:
-        72:59:b8:ec:e9:57:f4:bf:37
+        30:2c:02:14:7e:5e:94:fc:7f:ca:81:ab:b3:32:f7:21:83:48:
+        48:5f:0a:f1:13:ca:02:14:73:54:32:14:51:22:bf:0b:ec:d7:
+        6a:6a:fa:a7:1d:46:b4:c2:a3:b5
 -----BEGIN CERTIFICATE-----
-MIIDMTCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD
+MIIDMjCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD
 VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMRIwEAYDVQQKEwl5YVNTTCBE
 U0ExEjAQBgNVBAMTCXlhU1NMIERTQTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNz
-bC5jb20wHhcNMDUwMTIzMjI1NDUxWhcNMDcxMDIwMjI1NDUxWjB4MQswCQYDVQQG
+bC5jb20wHhcNMDUwMzA3MDMyMjAwWhcNNDYwNDAxMDMyMjAwWjB4MQswCQYDVQQG
 EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDESMBAGA1UE
 ChMJeWFTU0wgRFNBMRIwEAYDVQQDEwl5YVNTTCBEU0ExHTAbBgkqhkiG9w0BCQEW
 DmluZm9AeWFzc2wuY29tMIHwMIGoBgcqhkjOOAQBMIGcAkEAmSlpgMk8mGhFqYL+
@@ -63,6 +63,6 @@ IeRhRHPp4jCBogYDVR0jBIGaMIGXgBS++Yxd1hy0
 eDELMAkGA1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxh
 bmQxEjAQBgNVBAoTCXlhU1NMIERTQTESMBAGA1UEAxMJeWFTU0wgRFNBMR0wGwYJ
 KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbYIBADAMBgNVHRMEBTADAQH/MAkGByqG
-SM44BAMDLgAwKwIUdEafkXskFzvuDxDjdmL03IHm/f4CEwj0hwqrupzeOmlyWbjs
-6Vf0vzc=
+SM44BAMDLwAwLAIUfl6U/H/KgauzMvchg0hIXwrxE8oCFHNUMhRRIr8L7Ndqavqn
+HUa0wqO1
 -----END CERTIFICATE-----

=== modified file 'extra/yassl/certs/server-cert.pem'
--- a/extra/yassl/certs/server-cert.pem	2006-05-03 11:08:24 +0000
+++ b/extra/yassl/certs/server-cert.pem	2010-06-08 13:36:47 +0000
@@ -5,8 +5,8 @@ Certificate:
         Signature Algorithm: md5WithRSAEncryption
         Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@stripped
         Validity
-            Not Before: Jan 18 20:50:59 2005 GMT
-            Not After : Oct 15 20:50:59 2007 GMT
+            Not Before: Mar  8 03:00:47 2005 GMT
+            Not After : Apr  2 03:00:47 2046 GMT
         Subject: C=US, ST=Oregon, L=Portland, O=taoSoftDev, CN=www.taosoftdev.com/emailAddress=info@stripped
         Subject Public Key Info:
             Public Key Algorithm: rsaEncryption
@@ -19,20 +19,20 @@ Certificate:
                     f2:25:93:22:e7
                 Exponent: 65537 (0x10001)
     Signature Algorithm: md5WithRSAEncryption
-        08:36:07:8c:3a:7f:f9:91:0a:82:d1:6a:c1:34:be:bc:2d:b2:
-        20:98:dc:45:50:53:9c:66:e6:26:71:bd:fa:d2:b4:91:d3:53:
-        c0:20:05:c0:b6:84:9a:5f:3f:61:75:f5:fd:c6:ec:e2:f6:9f:
-        a2:13:17:a9:b7:83:60:cc:cb:eb
+        36:72:12:3b:ac:e4:58:83:09:86:4f:71:2a:3a:0d:8a:05:27:
+        75:f3:3e:62:4f:ab:b8:70:20:cd:ad:70:ab:91:11:68:f8:82:
+        33:e2:78:85:a8:16:f5:66:bd:68:2c:5a:26:15:12:1e:6e:83:
+        c7:6d:62:b9:c3:ff:e1:86:e4:e6
 -----BEGIN CERTIFICATE-----
 MIIB9zCCAaECAQEwDQYJKoZIhvcNAQEEBQAwgYkxCzAJBgNVBAYTAlVTMQ8wDQYD
 VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290
 aDEkMCIGA1UEAxMbd3d3LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZI
-hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAxMTgyMDUwNTlaFw0wNzEwMTUy
-MDUwNTlaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH
+hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAzMDgwMzAwNDdaFw00NjA0MDIw
+MzAwNDdaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH
 EwhQb3J0bGFuZDETMBEGA1UEChMKdGFvU29mdERldjEbMBkGA1UEAxMSd3d3LnRh
 b3NvZnRkZXYuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0G
 CSqGSIb3DQEBAQUAA0sAMEgCQQCkaLu8tydfPPV4xhqvuZX8fmEfqIEKykOImgPg
 0KZ5cBY0uXx1VMpwGWY4vm4ofqX/azyDLzlCwxXzvfIlkyLnAgMBAAEwDQYJKoZI
-hvcNAQEEBQADQQAINgeMOn/5kQqC0WrBNL68LbIgmNxFUFOcZuYmcb360rSR01PA
-IAXAtoSaXz9hdfX9xuzi9p+iExept4NgzMvr
+hvcNAQEEBQADQQA2chI7rORYgwmGT3EqOg2KBSd18z5iT6u4cCDNrXCrkRFo+IIz
+4niFqBb1Zr1oLFomFRIeboPHbWK5w//hhuTm
 -----END CERTIFICATE-----

=== modified file 'extra/yassl/include/lock.hpp'
--- a/extra/yassl/include/lock.hpp	2007-01-29 15:54:40 +0000
+++ b/extra/yassl/include/lock.hpp	2010-06-10 00:30:41 +0000
@@ -23,13 +23,21 @@
 #ifndef yaSSL_LOCK_HPP
 #define yaSSL_LOCK_HPP
 
+/*
+  Visual Studio Source Annotations header (sourceannotations.h) fails
+  to compile if outside of the global namespace.
+*/
+#ifdef YASSL_THREAD_SAFE
+#ifdef _WIN32
+#include <windows.h>
+#endif
+#endif
 
 namespace yaSSL {
 
 
-#ifdef MULTI_THREADED
+#ifdef YASSL_THREAD_SAFE
     #ifdef _WIN32
-        #include <windows.h>
 
         class Mutex {
             CRITICAL_SECTION cs_;
@@ -69,7 +77,7 @@ namespace yaSSL {
         };
 
     #endif // _WIN32
-#else  // MULTI_THREADED (WE'RE SINGLE)
+#else  // YASSL_THREAD_SAFE (WE'RE SINGLE)
 
     class Mutex {
     public:
@@ -79,7 +87,7 @@ namespace yaSSL {
         };
     };
 
-#endif // MULTI_THREADED
+#endif // YASSL_THREAD_SAFE
 
 
 

=== modified file 'extra/yassl/src/Makefile.am'
--- a/extra/yassl/src/Makefile.am	2006-11-27 20:15:25 +0000
+++ b/extra/yassl/src/Makefile.am	2010-06-08 13:36:47 +0000
@@ -5,7 +5,7 @@ libyassl_la_SOURCES = buffer.cpp cert_wr
 	handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
 	template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
 EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
-AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX
+AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%

=== modified file 'extra/yassl/src/lock.cpp'
--- a/extra/yassl/src/lock.cpp	2007-01-29 15:54:40 +0000
+++ b/extra/yassl/src/lock.cpp	2010-06-08 13:36:47 +0000
@@ -26,7 +26,7 @@
 namespace yaSSL {
 
 
-#ifdef MULTI_THREADED
+#ifdef YASSL_THREAD_SAFE
     #ifdef _WIN32
         
         Mutex::Mutex()
@@ -79,7 +79,7 @@ namespace yaSSL {
          
 
     #endif // _WIN32
-#endif // MULTI_THREADED
+#endif // YASSL_THREAD_SAFE
 
 
 

=== modified file 'extra/yassl/taocrypt/CMakeLists.txt'
--- a/extra/yassl/taocrypt/CMakeLists.txt	2007-08-03 19:51:37 +0000
+++ b/extra/yassl/taocrypt/CMakeLists.txt	2010-06-08 13:36:47 +0000
@@ -16,6 +16,8 @@
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
                     ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)
 
+ADD_DEFINITIONS("-DYASSL_THREAD_SAFE")
+
 SET(TAOCRYPT_SOURCES		src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp 
 				src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp 
 				src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp

=== modified file 'extra/yassl/taocrypt/benchmark/Makefile.am'
--- a/extra/yassl/taocrypt/benchmark/Makefile.am	2007-03-22 15:53:37 +0000
+++ b/extra/yassl/taocrypt/benchmark/Makefile.am	2010-06-08 13:36:47 +0000
@@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/../include -I$(sr
 noinst_PROGRAMS    = benchmark
 benchmark_SOURCES  = benchmark.cpp
 benchmark_LDADD    = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
-benchmark_CXXFLAGS = -DYASSL_PURE_C
+benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
 EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
 
 # Don't update the files from bitkeeper

=== modified file 'extra/yassl/taocrypt/src/Makefile.am'
--- a/extra/yassl/taocrypt/src/Makefile.am	2006-11-27 20:15:25 +0000
+++ b/extra/yassl/taocrypt/src/Makefile.am	2010-06-08 13:36:47 +0000
@@ -8,7 +8,8 @@ libtaocrypt_la_SOURCES  = aes.cpp aestab
         random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \
         tftables.cpp twofish.cpp
 
-libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C
+libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \
+			  @yassl_thread_cxxflags@
 
 EXTRA_DIST = $(wildcard ../include/*.hpp)
 

=== modified file 'extra/yassl/taocrypt/test/Makefile.am'
--- a/extra/yassl/taocrypt/test/Makefile.am	2007-01-29 17:46:06 +0000
+++ b/extra/yassl/taocrypt/test/Makefile.am	2010-06-08 13:36:47 +0000
@@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/../include -I$(sr
 noinst_PROGRAMS = test
 test_SOURCES = test.cpp
 test_LDADD    = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
-test_CXXFLAGS = -DYASSL_PURE_C
+test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
 EXTRA_DIST = make.bat
 
 # Don't update the files from bitkeeper

=== modified file 'extra/yassl/taocrypt/test/memory.cpp'
--- a/extra/yassl/taocrypt/test/memory.cpp	2006-04-07 09:35:12 +0000
+++ b/extra/yassl/taocrypt/test/memory.cpp	2010-06-08 13:36:47 +0000
@@ -13,7 +13,7 @@
 To use MemoryTracker merely add this file to your project
 No need to instantiate anything
 
-If your app is multi threaded define MULTI_THREADED
+If your app is multi threaded define YASSL_THREAD_SAFE
 
 *********************************************************************/
 

=== modified file 'extra/yassl/testsuite/Makefile.am'
--- a/extra/yassl/testsuite/Makefile.am	2007-01-29 17:46:06 +0000
+++ b/extra/yassl/testsuite/Makefile.am	2010-06-08 13:36:47 +0000
@@ -4,7 +4,7 @@ testsuite_SOURCES  = testsuite.cpp ../ta
 	../examples/client/client.cpp ../examples/server/server.cpp \
 	../examples/echoclient/echoclient.cpp \
 	../examples/echoserver/echoserver.cpp
-testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER
+testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER @yassl_thread_cxxflags@
 testsuite_LDADD    = $(top_builddir)/extra/yassl/src/libyassl.la \
                      $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
 EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2009-10-27 13:11:06 +0000
+++ b/include/my_sys.h	2010-06-08 19:20:54 +0000
@@ -37,7 +37,7 @@ extern int NEAR my_errno;		/* Last error
 
 #define MYSYS_PROGRAM_USES_CURSES()  { error_handler_hook = my_message_curses;	mysys_uses_curses=1; }
 #define MYSYS_PROGRAM_DONT_USE_CURSES()  { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
-#define MY_INIT(name);		{ my_progname= name; my_init(); }
+#define MY_INIT(name)   { my_progname= name; my_init(); }
 
 #define ERRMSGSIZE	(SC_MAXWIDTH)	/* Max length of a error message */
 #define NRERRBUFFS	(2)	/* Buffers for parameters */

=== modified file 'innobase/row/row0mysql.c'
--- a/innobase/row/row0mysql.c	2009-06-25 09:50:26 +0000
+++ b/innobase/row/row0mysql.c	2010-07-07 17:13:53 +0000
@@ -3335,20 +3335,13 @@ fputs("	 InnoDB: You are trying to drop 
 
 	err = trx->error_state;
 
-	if (err != DB_SUCCESS) {
-		ut_a(err == DB_OUT_OF_FILE_SPACE);
-
-		err = DB_MUST_GET_MORE_FILE_SPACE;
-		
-		row_mysql_handle_errors(&err, trx, thr, NULL);
-
-		ut_error;
-	} else {
+	switch (err) {
 		ibool		is_path;
 		const char*	name_or_path;
 
+	case DB_SUCCESS:
 		space_id = table->space;
-		
+
 		if (table->dir_path_of_temp_table != NULL) {
 			dir_path_of_temp_table =
 				mem_strdup(table->dir_path_of_temp_table);
@@ -3407,7 +3400,27 @@ fputs("	 InnoDB: You are trying to drop 
 				err = DB_ERROR;
 			}
 		}
+		break;
+
+	case DB_TOO_MANY_CONCURRENT_TRXS:
+		/* Cannot even find a free slot for the
+		the undo log. We can directly exit here
+		and return the DB_TOO_MANY_CONCURRENT_TRXS
+		error. */
+		break;
+
+        case DB_OUT_OF_FILE_SPACE:
+		err = DB_MUST_GET_MORE_FILE_SPACE;
+
+		row_mysql_handle_errors(&err, trx, thr, NULL);
+
+		/* Fall through to raise error */
+
+	default:
+		/* No other possible error returns */
+		ut_error;
 	}
+
 funct_exit:
 
   	trx_commit_for_mysql(trx);

=== modified file 'mysql-test/lib/mtr_cases.pl'
--- a/mysql-test/lib/mtr_cases.pl	2007-11-01 10:02:28 +0000
+++ b/mysql-test/lib/mtr_cases.pl	2010-06-15 09:00:02 +0000
@@ -246,8 +246,10 @@ sub collect_test_cases ($) {
 	push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
 	# Group test with equal options together.
 	# Ending with "~" makes empty sort later than filled
-	push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
-
+	if ( $tinfo->{'master_opt'}[0] )
+	{
+	  push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
+	}
 	$sort_criteria{$test_name} = join(" ", @criteria);
       }
     }

=== modified file 'mysql-test/lib/mtr_process.pl'
--- a/mysql-test/lib/mtr_process.pl	2007-08-03 10:36:32 +0000
+++ b/mysql-test/lib/mtr_process.pl	2010-06-14 09:26:42 +0000
@@ -264,8 +264,9 @@ sub spawn_parent_impl {
           if ( $timer_name eq "suite" )
           {
             # We give up here
-            # FIXME we should only give up the suite, not all of the run?
             print STDERR "\n";
+            kill(9, $pid);                # Kill mysqltest
+            mtr_kill_leftovers();         # Kill servers the hard way
             mtr_error("Test suite timeout");
           }
           elsif ( $timer_name eq "testcase" )

=== modified file 'mysql-test/r/func_isnull.result'
--- a/mysql-test/r/func_isnull.result	2002-05-16 20:35:09 +0000
+++ b/mysql-test/r/func_isnull.result	2010-06-08 06:22:40 +0000
@@ -5,3 +5,17 @@ flush tables;
 select * from t1 where isnull(to_days(mydate));
 id	mydate
 drop table t1;
+#
+# Bug#53933 crash when using uncacheable subquery in the having clause of outer query
+#
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (0),(0);
+SELECT ISNULL((SELECT GET_LOCK('Bug#53933', 0) FROM t1 GROUP BY f1)) AS f2
+FROM t1 GROUP BY f1 HAVING f2 = f2;
+f2
+0
+SELECT RELEASE_LOCK('Bug#53933');
+RELEASE_LOCK('Bug#53933')
+1
+DROP TABLE t1;
+End of 5.0 tests

=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2009-12-17 11:25:50 +0000
+++ b/mysql-test/r/variables.result	2010-06-04 13:21:19 +0000
@@ -910,3 +910,11 @@ set global thread_cache_size         =@m
 # Test 'myisam_mmap_size' option is not dynamic
 SET @@myisam_mmap_size= 500M;
 ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
+#
+# Bug #52315: utc_date() crashes when system time > year 2037
+#
+SET TIMESTAMP=2*1024*1024*1024;
+#Should not crash
+SELECT UTC_DATE();
+SET TIMESTAMP=DEFAULT;
+End of 5.0 tests

=== modified file 'mysql-test/t/func_isnull.test'
--- a/mysql-test/t/func_isnull.test	2005-07-28 00:22:47 +0000
+++ b/mysql-test/t/func_isnull.test	2010-06-08 06:22:40 +0000
@@ -13,3 +13,18 @@ select * from t1 where isnull(to_days(my
 drop table t1;
 
 # End of 4.1 tests
+
+--echo #
+--echo # Bug#53933 crash when using uncacheable subquery in the having clause of outer query
+--echo #
+
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (0),(0);
+
+SELECT ISNULL((SELECT GET_LOCK('Bug#53933', 0) FROM t1 GROUP BY f1)) AS f2
+FROM t1 GROUP BY f1 HAVING f2 = f2;
+SELECT RELEASE_LOCK('Bug#53933');
+
+DROP TABLE t1;
+
+--echo End of 5.0 tests

=== modified file 'mysql-test/t/variables.test'
--- a/mysql-test/t/variables.test	2009-12-17 11:25:50 +0000
+++ b/mysql-test/t/variables.test	2010-06-04 13:21:19 +0000
@@ -771,3 +771,17 @@ set global thread_cache_size         =@m
 --echo # Test 'myisam_mmap_size' option is not dynamic
 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
 SET @@myisam_mmap_size= 500M;
+
+--echo #
+--echo # Bug #52315: utc_date() crashes when system time > year 2037
+--echo #
+
+--error 0, ER_UNKNOWN_ERROR
+SET TIMESTAMP=2*1024*1024*1024;
+--echo #Should not crash
+--disable_result_log
+SELECT UTC_DATE();
+--enable_result_log
+SET TIMESTAMP=DEFAULT;
+
+--echo End of 5.0 tests

=== modified file 'scripts/make_binary_distribution.sh'
--- a/scripts/make_binary_distribution.sh	2009-06-26 09:58:19 +0000
+++ b/scripts/make_binary_distribution.sh	2010-06-17 17:47:38 +0000
@@ -336,9 +336,11 @@ $CP mysql-test/t/*.def $BASE/mysql-test/
 $CP mysql-test/include/*.inc $BASE/mysql-test/include
 $CP mysql-test/include/*.test $BASE/mysql-test/include
 $CP mysql-test/t/*.def $BASE/mysql-test/t
-$CP mysql-test/t/*.test mysql-test/t/*.imtest \
-    mysql-test/t/*.disabled mysql-test/t/*.opt \
-    mysql-test/t/*.slave-mi mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
+# Attention: when the wildcards expand to a line that is very long,
+# it may exceed the command line length limit on some platform(s). Bug#54590
+$CP mysql-test/t/*.test mysql-test/t/*.imtest $BASE/mysql-test/t
+$CP mysql-test/t/*.disabled mysql-test/t/*.opt $BASE/mysql-test/t
+$CP mysql-test/t/*.slave-mi mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
 $CP mysql-test/r/*.result mysql-test/r/*.require \
     $BASE/mysql-test/r
 

=== modified file 'sql/item_cmpfunc.h'
--- a/sql/item_cmpfunc.h	2009-12-04 17:58:40 +0000
+++ b/sql/item_cmpfunc.h	2010-06-08 06:22:40 +0000
@@ -1209,8 +1209,8 @@ public:
     else
     {
       args[0]->update_used_tables();
-      if ((const_item_cache= !(used_tables_cache= args[0]->used_tables())) &&
-          !with_subselect)
+      if ((const_item_cache= !(used_tables_cache= args[0]->used_tables()) &&
+          !with_subselect))
       {
 	/* Remember if the value is always NULL or never NULL */
 	cached_value= (longlong) args[0]->is_null();

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-12-17 11:25:50 +0000
+++ b/sql/mysqld.cc	2010-06-04 13:21:19 +0000
@@ -2835,6 +2835,14 @@ static int init_common_variables(const c
 
   max_system_variables.pseudo_thread_id= (ulong)~0;
   server_start_time= flush_status_time= time((time_t*) 0);
+  
+  /* TODO: remove this when my_time_t is 64 bit compatible */
+  if (server_start_time >= (time_t) MY_TIME_T_MAX)
+  {
+    sql_print_error("This MySQL server doesn't support dates later then 2038");
+    return 1;
+  }
+
   if (init_thread_environment())
     return 1;
   mysql_init_variables();

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2010-02-20 17:08:35 +0000
+++ b/sql/opt_range.cc	2010-07-15 06:10:16 +0000
@@ -6066,6 +6066,9 @@ check_quick_keys(PARAM *param,uint idx,S
     tmp_max_flag=max_key_flag | key_tree->max_flag;
   }
 
+  if (unlikely(param->thd->killed != 0))
+    return HA_POS_ERROR;
+
   keynr=param->real_keynr[idx];
   param->range_count++;
   if (!tmp_min_flag && ! tmp_max_flag &&

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2010-03-10 11:04:32 +0000
+++ b/sql/set_var.cc	2010-06-04 13:21:19 +0000
@@ -2712,10 +2712,26 @@ int set_var_collation_client::update(THD
 
 /****************************************************************************/
 
+bool sys_var_timestamp::check(THD *thd, set_var *var)
+{
+  time_t val;
+  var->save_result.ulonglong_value= var->value->val_int();
+  val= (time_t) var->save_result.ulonglong_value;
+  if (val < (time_t) MY_TIME_T_MIN || val > (time_t) MY_TIME_T_MAX)
+  {
+    my_message(ER_UNKNOWN_ERROR, 
+               "This version of MySQL doesn't support dates later than 2038",
+               MYF(0));
+    return TRUE;
+  }
+  return FALSE;
+}
+
+
 bool sys_var_timestamp::update(THD *thd,  set_var *var)
 {
   thd->set_time((time_t) var->save_result.ulonglong_value);
-  return 0;
+  return FALSE;
 }
 
 

=== modified file 'sql/set_var.h'
--- a/sql/set_var.h	2009-06-19 09:27:19 +0000
+++ b/sql/set_var.h	2010-06-04 13:21:19 +0000
@@ -536,6 +536,7 @@ class sys_var_timestamp :public sys_var
 {
 public:
   sys_var_timestamp(const char *name_arg) :sys_var(name_arg) {}
+  bool check(THD *thd, set_var *var);
   bool update(THD *thd, set_var *var);
   void set_default(THD *thd, enum_var_type type);
   bool check_type(enum_var_type type)    { return type == OPT_GLOBAL; }

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2010-02-20 17:08:35 +0000
+++ b/sql/sql_class.h	2010-06-04 13:21:19 +0000
@@ -1707,6 +1707,11 @@ public:
   inline void	end_time()    { safe_time(&start_time); }
   inline void	set_time(time_t t) { time_after_lock=start_time=user_time=t; }
   inline void	lock_time()   { safe_time(&time_after_lock); }
+  /*TODO: this will be obsolete when we have support for 64 bit my_time_t */
+  inline bool	is_valid_time() 
+  { 
+    return (start_time < (time_t) MY_TIME_T_MAX); 
+  }
   inline void	insert_id(ulonglong id_arg)
   {
     last_insert_id= id_arg;

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-06-01 11:28:58 +0000
+++ b/sql/sql_parse.cc	2010-06-07 09:49:52 +0000
@@ -1771,6 +1771,19 @@ bool dispatch_command(enum enum_server_c
   thd->enable_slow_log= TRUE;
   thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
   thd->set_time();
+  if (!thd->is_valid_time())
+  {
+    /*
+     If the time has got past 2038 we need to shut this server down
+     We do this by making sure every command is a shutdown and we 
+     have enough privileges to shut the server down
+
+     TODO: remove this when we have full 64 bit my_time_t support
+    */
+    thd->security_ctx->master_access|= SHUTDOWN_ACL;
+    command= COM_SHUTDOWN;
+  }
+
   VOID(pthread_mutex_lock(&LOCK_thread_count));
   thd->query_id= global_query_id;
   
@@ -2230,8 +2243,12 @@ bool dispatch_command(enum enum_server_c
       SHUTDOWN_DEFAULT is 0. If client is >= 4.1.3, the shutdown level is in
       packet[0].
     */
-    enum mysql_enum_shutdown_level level=
-      (enum mysql_enum_shutdown_level) (uchar) packet[0];
+    enum mysql_enum_shutdown_level level;
+    if (!thd->is_valid_time())
+      level= SHUTDOWN_DEFAULT;
+    else
+      level= (enum mysql_enum_shutdown_level) (uchar) packet[0];
+
     DBUG_PRINT("quit",("Got shutdown command for level %u", level));
     if (level == SHUTDOWN_DEFAULT)
       level= SHUTDOWN_WAIT_ALL_BUFFERS; // soon default will be configurable

=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc	2009-08-28 15:51:31 +0000
+++ b/sql/sql_prepare.cc	2010-07-30 12:34:40 +0000
@@ -674,6 +674,18 @@ static void setup_one_conversion_functio
 }
 
 #ifndef EMBEDDED_LIBRARY
+
+/**
+  Check whether this parameter data type is compatible with long data.
+  Used to detect whether a long data stream has been supplied to a
+  incompatible data type.
+*/
+inline bool is_param_long_data_type(Item_param *param)
+{
+  return ((param->param_type >= MYSQL_TYPE_TINY_BLOB) &&
+          (param->param_type <= MYSQL_TYPE_STRING));
+}
+
 /*
   Routines to assign parameters from data supplied by the client.
 
@@ -737,6 +749,14 @@ static bool insert_params_withlog(Prepar
           DBUG_RETURN(1);
       }
     }
+    /*
+      A long data stream was supplied for this parameter marker.
+      This was done after prepare, prior to providing a placeholder
+      type (the types are supplied at execute). Check that the
+      supplied type of placeholder can accept a data stream.
+    */
+    else if (! is_param_long_data_type(param))
+      DBUG_RETURN(1);
     res= param->query_val_str(&str);
     if (param->convert_str_value(thd))
       DBUG_RETURN(1);                           /* out of memory */
@@ -775,6 +795,14 @@ static bool insert_params(Prepared_state
           DBUG_RETURN(1);
       }
     }
+    /*
+      A long data stream was supplied for this parameter marker.
+      This was done after prepare, prior to providing a placeholder
+      type (the types are supplied at execute). Check that the
+      supplied type of placeholder can accept a data stream.
+    */
+    else if (! is_param_long_data_type(param))
+      DBUG_RETURN(1);
     if (param->convert_str_value(stmt->thd))
       DBUG_RETURN(1);                           /* out of memory */
   }

=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c	2010-06-01 11:28:58 +0000
+++ b/tests/mysql_client_test.c	2010-06-28 15:21:28 +0000
@@ -16757,6 +16757,63 @@ static void test_bug53907()
 }
 
 
+/**
+  Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run
+*/
+
+static void test_bug54041()
+{
+  int rc;
+  MYSQL_STMT *stmt;
+  MYSQL_BIND bind;
+
+  DBUG_ENTER("test_bug54041");
+  myheader("test_bug54041");
+
+  rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
+  myquery(rc);
+
+  rc= mysql_query(mysql, "CREATE TABLE t1 (a INT)");
+  myquery(rc);
+
+  stmt= mysql_simple_prepare(mysql, "INSERT INTO t1 (a) VALUES (?)");
+  check_stmt(stmt);
+  verify_param_count(stmt, 1);
+
+  memset(&bind, 0, sizeof(bind));
+
+  /* Any type that does not support long data handling. */
+  bind.buffer_type= MYSQL_TYPE_LONG;
+
+  rc= mysql_stmt_bind_param(stmt, &bind);
+  check_execute(stmt, rc);
+
+  /*
+    Trick the client API into sending a long data packet for
+    the parameter. Long data is only supported for string and
+    binary types.
+  */
+  stmt->params[0].buffer_type= MYSQL_TYPE_STRING;
+
+  rc= mysql_stmt_send_long_data(stmt, 0, "data", 5);
+  check_execute(stmt, rc);
+
+  /* Undo API violation. */
+  stmt->params[0].buffer_type= MYSQL_TYPE_LONG;
+
+  rc= mysql_stmt_execute(stmt);
+  /* Incorrect arguments. */
+  check_execute_r(stmt, rc);
+
+  mysql_stmt_close(stmt);
+
+  rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
+  myquery(rc);
+
+  DBUG_VOID_RETURN;
+}
+
+
 /*
   Read and parse arguments and MySQL options from my.cnf
 */
@@ -17062,6 +17119,7 @@ static struct my_tests_st my_tests[]= {
   { "test_bug45010", test_bug45010 },
   { "test_bug53371", test_bug53371 },
   { "test_bug53907", test_bug53907 },
+  { "test_bug54041", test_bug54041 },
   { 0, 0 }
 };
 


Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20100802074824-5201e4ppst9t3yqt.bundle
Thread
bzr push into mysql-5.0 branch (Georgi.Kodinov:2877 to 2882) Georgi Kodinov2 Aug