1. 21 Jun, 2010 3 commits
  2. 18 Jun, 2010 1 commit
  3. 17 Jun, 2010 3 commits
  4. 15 Jun, 2010 11 commits
  5. 14 Jun, 2010 4 commits
  6. 12 Jun, 2010 2 commits
  7. 11 Jun, 2010 12 commits
  8. 10 Jun, 2010 4 commits
    • Davi Arnaut's avatar
      Bug#42733: Type-punning warnings when compiling MySQL -- · 53b88296
      Davi Arnaut authored
                  strict aliasing violations.
      
      One somewhat major source of strict-aliasing violations and
      related warnings is the SQL_LIST structure. For example,
      consider its member function `link_in_list` which takes
      a pointer to pointer of type T (any type) as a pointer to
      pointer to unsigned char. Dereferencing this pointer, which
      is done to reset the next field, violates strict-aliasing
      rules and might cause problems for surrounding code that
      uses the next field of the object being added to the list.
      
      The solution is to use templates to parametrize the SQL_LIST
      structure in order to deference the pointers with compatible
      types. As a side bonus, it becomes possible to remove quite
      a few casts related to acessing data members of SQL_LIST.
      53b88296
    • Davi Arnaut's avatar
      Bug#42733: Type-punning warnings when compiling MySQL -- · bb036c93
      Davi Arnaut authored
                 strict aliasing violations.
      
      Essentially, the problem is that large parts of the server were
      developed in simpler times (last decades, pre C99 standard) when
      strict aliasing and compilers supporting such optimizations were
      rare to non-existent. Thus, when compiling the server with a modern
      compiler that uses strict aliasing rules to perform optimizations,
      there are several places in the code that might trigger undefined
      behavior.
      
      As evinced by some recent bugs, GCC does a somewhat good of job
      misoptimizing such code, but on the other hand also gives warnings
      about suspicious code. One problem is that the warnings aren't
      always accurate, yet we can't afford to just shut them off as we
      might miss real cases. False-positive cases are aggravated mostly
      by casts that are likely to trigger undefined behavior.
      
      The solution is to start a cleanup process focused on fixing and
      reducing the amount of strict-aliasing related warnings produced
      by GCC and others compilers. A good deal of noise reduction can
      be achieved by just removing useless casts that are product of
      historical cruft and are likely to trigger undefined behavior if
      dereferenced.
      bb036c93
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · 22207652
      Alexander Nozdrin authored
      22207652
    • Alexander Nozdrin's avatar
      Revert a patch for Bug#54334 (Double initialization of mysys mutexes). · b985f884
      Alexander Nozdrin authored
      Revision ID of the patch: marc.alff@oracle.com-20100608124148-lr1ult7lwo75niev
      b985f884