1. 14 Dec, 2009 8 commits
  2. 13 Dec, 2009 3 commits
    • lars-erik.bjork@sun.com's avatar
      This is a patch for Bug#48500 · 44e2c65a
      lars-erik.bjork@sun.com authored
      5.0 buffer overflow for ER_UPDATE_INFO, or truncated info message in 5.1
            
      5.0.86 has a buffer overflow/crash, and 5.1.40 has a truncated message.
            
      errmsg.txt contains this:
            
      ER_UPDATE_INFO
      rum "Linii identificate (matched): %ld  Schimbate: %ld  Atentionari 
      (warnings): %ld"
      When that is sprintf'd into a buffer of STRING_BUFFER_USUAL_SIZE size,
      a buffer overflow can happen.
            
      The solution to this is to use MYSQL_ERRMSG_SIZE for the buffer size, 
      instead of STRING_BUFFER_USUAL_SIZE. This will allow longer strings. 
      To avoid potential crashes, we will also use my_snprintf instead of
      sprintf.
      44e2c65a
    • Alexey Kopytov's avatar
      Automerge · 4a12f66c
      Alexey Kopytov authored
      4a12f66c
    • Alexey Kopytov's avatar
      Bug #42849: innodb crash with varying time_zone on partitioned · a8cfe3d4
      Alexey Kopytov authored
                  timestamp primary key 
       
      Since TIMESTAMP values are adjusted by the current time zone  
      settings in both numeric and string contexts, using any 
      expressions involving TIMESTAMP values as a  
      (sub)partitioning function leads to undeterministic behavior of  
      partitioned tables. The effect may vary depending on a storage  
      engine, it can be either incorrect data being retrieved or  
      stored, or an assertion failure. The root cause of this is the  
      fact that the calculated partition ID may differ from a  
      previously calculated ID for the same data due to timezone  
      adjustments of the partitioning expression value. 
       
      Fixed by disabling any expressions involving TIMESTAMP values  
      to be used in partitioning functions with the follwing two 
      exceptions: 
       
      1. Creating or altering into a partitioned table that violates 
      the above rule is not allowed, but opening existing such tables 
      results in a warning rather than an error so that such tables 
      could be fixed. 
       
      2. UNIX_TIMESTAMP() is the only way to get a 
      timezone-independent value from a TIMESTAMP column, because it 
      returns the internal representation (a time_t value) of a 
      TIMESTAMP argument verbatim. So UNIX_TIMESTAMP(timestamp_column)
      is allowed and should be used to fix existing tables if one 
      wants to use TIMESTAMP columns with partitioning.
      a8cfe3d4
  3. 12 Dec, 2009 1 commit
    • Staale Smedseng's avatar
      Bug #45058 init_available_charsets uses double checked locking · 983770aa
      Staale Smedseng authored
            
      As documented in the bug report, the double checked locking
      pattern has inherent issues, and cannot guarantee correct
      initialization.
      
      This patch replaces the logic in init_available_charsets()
      with the use of pthread_once(3). A wrapper function,
      my_pthread_once(), is introduced and is used in lieu of direct
      calls to init_available_charsets(). Related defines
      MY_PTHREAD_ONCE_* are also introduced.
      
      For the Windows platform, the implementation in lp:sysbench is
      ported. For single-thread use, a simple define calls the
      function and sets the pthread_once control variable.
      
      Charset initialization is modified to use my_pthread_once().
      983770aa
  4. 11 Dec, 2009 13 commits
  5. 10 Dec, 2009 9 commits
  6. 09 Dec, 2009 6 commits