~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSS3Protocol.h

[patch 109/129] Merge patch for revision 1921 from InnoDB SVN:
revno: 1921
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6160
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6159
committer: vasil
timestamp: Wed 2009-11-11 13:33:49 +0000
message:
  branches/zip: Merge r6152:6159 from branches/5.1:
  
  (r6158 was skipped as an equivallent change has already been merged from MySQL)
  
    ------------------------------------------------------------------------
    r6154 | calvin | 2009-11-11 02:51:17 +0200 (Wed, 11 Nov 2009) | 17 lines
    Changed paths:
       M /branches/5.1/include/os0file.h
       M /branches/5.1/os/os0file.c
    
    branches/5.1: fix bug#3139: Mysql crashes: 'windows error 995'
    after several selects on a large DB
    
    During stress environment, Windows AIO may fail with error code
    ERROR_OPERATION_ABORTED. InnoDB does not handle the error, rather
    crashes. The cause of the error is unknown, but likely due to
    faulty hardware or driver.
    
    This patch introduces a new error code OS_FILE_OPERATION_ABORTED,
    which maps to Windows ERROR_OPERATION_ABORTED (995). When the error
    is detected during AIO, the InnoDB will issue a synchronous retry
    (read/write).
    
    This patch has been extensively tested by MySQL support.
    
    Approved by: Marko
    rb://196
    ------------------------------------------------------------------------
    r6158 | vasil | 2009-11-11 14:52:14 +0200 (Wed, 11 Nov 2009) | 37 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/handler/ha_innodb.h
    
    branches/5.1:
    
    Merge a change from MySQL:
    (this has been reviewed by Calvin and Marko, and Calvin says Luis has
    incorporated Marko's suggestions)
    
      ------------------------------------------------------------
      revno: 3092.5.1
      committer: Luis Soares <luis.soares@sun.com>
      branch nick: mysql-5.1-bugteam
      timestamp: Thu 2009-09-24 15:52:52 +0100
      message:
        BUG#42829: binlogging enabled for all schemas regardless of
        binlog-db-db / binlog-ignore-db
              
        InnoDB will return an error if statement based replication is used
        along with transaction isolation level READ-COMMITTED (or weaker),
        even if the statement in question is filtered out according to the
        binlog-do-db rules set. In this case, an error should not be printed.
              
        This patch addresses this issue by extending the existing check in
        external_lock to take into account the filter rules before deciding to
        print an error. Furthermore, it also changes decide_logging_format to
        take into consideration whether the statement is filtered out from 
        binlog before decision is made.
      added:
        mysql-test/suite/binlog/r/binlog_stm_do_db.result
        mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt
        mysql-test/suite/binlog/t/binlog_stm_do_db.test
      modified:
        sql/sql_base.cc
        sql/sql_class.cc
        storage/innobase/handler/ha_innodb.cc
        storage/innobase/handler/ha_innodb.h
        storage/innodb_plugin/handler/ha_innodb.cc
        storage/innodb_plugin/handler/ha_innodb.h
    
    ------------------------------------------------------------------------
modified:
  include/os0file.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fos0file.h
  os/os0file.c                   2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fos%2Fos0file.c
diff:
=== modified file 'include/os0file.h'

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 */
24
24
 
25
25
#include "CSHTTPStream.h"
26
 
#include "CSMd5.h"
27
26
class S3ProtocolCon;
28
27
 
29
28
#define PUB_KEY_BIT             ((uint8_t)1)
31
30
#define SERVER_BIT              ((uint8_t)4)
32
31
 
33
32
 
34
 
typedef struct S3Range {
35
 
         off64_t startByte;
36
 
         off64_t endByte;
37
 
} S3RangeRec, *S3RangePtr;
38
 
 
39
33
class CSS3Protocol: public CSRefObject {
40
34
        private:
41
35
        
45
39
        CSString *s3_private_key;
46
40
        
47
41
        uint8_t s3_ready; // A flag to indicate if the S3 protocol has been fully initialised.
48
 
        uint32_t s3_maxRetries; 
49
 
        uint32_t s3_sleepTime; 
 
42
        uint32_t s3_maxRetrys; 
50
43
        
51
44
        CSString *s3_getSignature(const char *verb, 
52
45
                                                                const char *md5, 
102
95
                }
103
96
        }
104
97
 
105
 
        void s3_setMaxRetries(uint32_t retries){s3_maxRetries = retries;}
106
 
        void s3_setSleepTime(uint32_t nap_time){s3_sleepTime = nap_time;}
107
 
        
108
98
        const char *s3_getPrivateKey() { return s3_private_key->getCString();}
109
99
        
110
100
        bool s3_isReady() { return ((s3_ready & SERVER_BIT) && (s3_ready & PUB_KEY_BIT) && (s3_ready & PRIV_KEY_BIT));}
115
105
        CSVector *s3_send(CSInputStream *input, const char *bucket, const char *key, off64_t size, const char *content_type = NULL, Md5Digest *digest = NULL, const char *s3Authorization = NULL, time_t s3AuthorizationTime = 0);
116
106
 
117
107
        // s3_receive() returns false if the object was not found.
118
 
        // If 'output' is NULL then only the headers will be fetched.
119
 
        CSVector *s3_receive(CSOutputStream *output, const char *bucket, const char *key, bool *found, S3RangePtr range = NULL, time_t *last_modified = NULL);
 
108
        CSVector *s3_receive(CSOutputStream *output, const char *bucket, const char *key, bool *found);
120
109
 
121
110
        // s3_delete() returns false if the object was not found.
122
111
        bool s3_delete(const char *bucket, const char *key);