1. 09 Dec, 2008 2 commits
    • Sergey Glukhov's avatar
      Bug#35796 SHOW CREATE TABLE and default value for BIT field · 3cba8276
      Sergey Glukhov authored
      show default value for BIT field in printable format
      
      
      mysql-test/r/type_bit.result:
        Bug#35796 SHOW CREATE TABLE and default value for BIT field
        test result
      mysql-test/t/type_bit.test:
        Bug#35796 SHOW CREATE TABLE and default value for BIT field
        test case
      sql/item.cc:
        Bug#35796 SHOW CREATE TABLE and default value for BIT field
        issue an error if BIN|HEX deafult value is empty value
        (behaviour like for INT fields)
      3cba8276
    • Alexey Kopytov's avatar
      Fixed type_float failures in --ps-protocol mode introduced by the test case for bug #27483. · fbbcf450
      Alexey Kopytov authored
      The reason for the failures was bug #21205 (fixed in 6.0 by dtoa, but still present in 5.0/5.1).
      
      mysql-test/r/type_float.result:
        Modified the failing test case so that bug #21205 does not occur.
      mysql-test/t/type_float.test:
        Modified the failing test case so that bug #21205 does not occur.
      fbbcf450
  2. 08 Dec, 2008 3 commits
  3. 04 Dec, 2008 1 commit
    • Andrei Elkin's avatar
      Bug #33420 Test 'rpl_packet' fails randomly with changed "Exec_Master_Log_Pos" · 8425ef46
      Andrei Elkin authored
      Bug #41173 rpl_packet fails sporadically on pushbuild: query 'DROP TABLE t1' failed
      
      
      The both issues appeared to be a race between the SQL thread executing CREATE table t1
      and the IO thread that is expected to stop at the consequent big size event.
      The two events need serialization which is implemented.
      The early bug required back-porting a part fixes for bug#38350 exclusively for 5.0 version.
      
      
      
      mysql-test/r/rpl_packet.result:
        results changed due to bug#33420, bug#41173.
      mysql-test/t/rpl_packet.test:
        adding synchronization for sql and io thread (bug#41173 problem).
        simplifying the output to show only a relevant info (5.0 sole problem bug#33420).
      8425ef46
  4. 03 Dec, 2008 2 commits
    • Alexey Kopytov's avatar
      Fix for bug #27483: Casting 'scientific notation type' to 'unsigned · 7aa1074c
      Alexey Kopytov authored
                          bigint' fails on windows.
      
      Visual Studio does not take into account some x86 hardware limitations
      which leads to incorrect results when converting large DOUBLE values
      to BIGINT UNSIGNED ones.
      
      Fixed by adding a workaround for double->ulonglong conversion on
      Windows.
      
      
      include/config-win.h:
        Added double2ulonglong(double) function implementing a workaround for
        broken double->ulonglong conversion on Windows/x86.
      include/my_global.h:
        Define double2ulonglong() as a simple typecast for anything but
        Windows.
      mysql-test/r/type_float.result:
        Added a test case for bug #27483.
      mysql-test/t/type_float.test:
        Added a test case for bug #27483.
      7aa1074c
    • unknown's avatar
      Raise version number after cloning 5.0.74 · 0e559993
      unknown authored
      0e559993
  5. 02 Dec, 2008 1 commit
  6. 01 Dec, 2008 6 commits
    • Georgi Kodinov's avatar
    • Georgi Kodinov's avatar
      merged 5.0-main into 5.0-bugteam · b5256ebb
      Georgi Kodinov authored
      b5256ebb
    • Georgi Kodinov's avatar
      merged bug 39920 to 5.0-bugteam · 4123461d
      Georgi Kodinov authored
      4123461d
    • Georgi Kodinov's avatar
      Bug #39920: MySQL cannot deal with Leap Second expression in string literal. · 4a10c789
      Georgi Kodinov authored
                        
      Updated MySQL time handling code to react correctly on UTC leap second additions.
      MySQL functions that return the OS current time, like e.g. CURDATE(), NOW() etc
      will return :59:59 instead of :59:60 or 59:61.
      As a result the reader will receive :59:59 for 2 or 3 consecutive seconds 
      during the leap second.
      This fix will not affect the values returned by UNIX_TIMESTAMP() for leap seconds.
      But note that when converting the value returned by UNIX_TIMESTAMP() to broken 
      down time the correction of leap seconds will still be applied.
      Note that this fix will make a difference *only* if the OS is specially configured
      to return leap seconds from the OS time calls or when using a MySQL time zone 
      defintion that has leap seconds.
      Even after this change date/time literals (or other broken down time 
      representations) with leap seconds (ending on :59:60 or 59:61) will still be 
      considered illegal and discarded by the server with an error or 
      a warning depending on the sql mode.
      Added a test case to demonstrate the effect of the fix.
      
      mysql-test/r/timezone3.result:
        Bug #39920: test case
      mysql-test/std_data/Moscow_leap:
        Bug #39920: updated the Moscow time zone to Dr. Olson's tzdata 2008i 
        to accomodate for the 2008 leap second
      mysql-test/t/timezone3.test:
        Bug #39920: test case
      sql/tztime.cc:
        Bug #39920: adjust leap seconds (:60 or :61) to :59
      sql/tztime.h:
        Bug #39920: adjust leap seconds (:60 or :61) to :59
      4a10c789
    • Georgi Kodinov's avatar
      Addendum to bug #37339 : make the test case portable to windows · 3c53e76e
      Georgi Kodinov authored
      by using and taking out a full path.
      
      mysql-test/r/ctype_filesystem.result:
        Bug #37399: use MYSQL_TEST_DIR rooted test
      mysql-test/t/ctype_filesystem-master.opt:
        Bug #37399: use MYSQL_TEST_DIR rooted test
      mysql-test/t/ctype_filesystem.test:
        Bug #37399: use MYSQL_TEST_DIR rooted test
      3c53e76e
    • Gleb Shchepa's avatar
      After-push commit for bug #33461 to make valgrind happy: · a9384a07
      Gleb Shchepa authored
      TABLE_LIST doesn't free Strings in its string lists
      (TABLE_LIST::use_index and TABLE_liST::ignore_index), so
      calling c_ptr_safe() on that Strings leads to memleaks.
      OTOH "safe" c_ptr_safe() is not necessary there and we can
      replace it with c_ptr().
      a9384a07
  7. 28 Nov, 2008 6 commits
    • Matthias Leich's avatar
      Merge of last pushes into GCA tree, no conflicts · 3ef2c733
      Matthias Leich authored
      Diff to actual 5.0-bugteam is revno: 2725 only
      3ef2c733
    • Gleb Shchepa's avatar
      Bug #33461: SELECT ... FROM <view> USE INDEX (...) throws · 854ef1be
      Gleb Shchepa authored
                  an error
      
      Even after the fix for bug 28701 visible behaviors of
      SELECT FROM a view and SELECT FROM a regular table are
      little bit different:
      
      1. "SELECT FROM regular table USE/FORCE/IGNORE(non
         existent index)" fails with a "ERROR 1176 (HY000):
         Key '...' doesn't exist in table '...'"
      
      2. "SELECT FROM view USING/FORCE/IGNORE(any index)" fails
         with a "ERROR 1221 (HY000): Incorrect usage of
         USE/IGNORE INDEX and VIEW".  OTOH "SHOW INDEX FROM
         view" always returns empty result set, so from the point
         of same behaviour view we trying to use/ignore non
         existent index.
      
      To harmonize the behaviour of USE/FORCE/IGNORE(index)
      clauses in SELECT from a view and from a regular table the
      "ERROR 1221 (HY000): Incorrect usage of USE/IGNORE INDEX
      and VIEW" message has been replaced with the "ERROR 1176
      (HY000): Key '...' doesn't exist in table '...'" message
      like for tables and non existent keys.
      
      
      mysql-test/r/view.result:
        Added test case for bug #33461.
        Updated test case for bug 28701.
      mysql-test/t/view.test:
        Added test case for bug #33461.
        Updated test case for bug 28701.
      sql/sql_view.cc:
        Bug #33461: SELECT ... FROM <view> USE INDEX (...) throws
                    an error
        
        To harmonize the behaviour of USE/FORCE/IGNORE(index)
        clauses in SELECT from a view and from a regular table the
        "ERROR 1221 (HY000): Incorrect usage of USE/IGNORE INDEX
        and VIEW" message has been replaced with the "ERROR 1176
        (HY000): Key '...' doesn't exist in table '...'" message
        like for tables and non existent keys.
      854ef1be
    • Georgi Kodinov's avatar
      merged bug 37339 to 5.0-bugteam · 42624db0
      Georgi Kodinov authored
      42624db0
    • Georgi Kodinov's avatar
      Bug #37339: SHOW VARIABLES not working properly with multi-byte datadir · 171ef77f
      Georgi Kodinov authored
            
      The SHOW VARIABLES LIKE .../SELECT @@/SELECT ... FROM INFORMATION_SCHEMA.VARIABLES
      were assuming that all the system variables are in system charset (UTF-8).
      However the variables that are settable through command line will have a different
      character set (character_set_filesystem).
      Fixed the server to remember the correct character set of basedir, datadir, tmpdir,
      ssl, plugin_dir, slave_load_tmpdir, innodb variables; init_connect and init_slave 
      variables and use it when processing data.
      
      mysql-test/r/ctype_filesystem.result:
        Bug #37339: test case (should be in utf-8)
      mysql-test/t/ctype_filesystem-master.opt:
        Bug #37339: test case (should be in ISO-8859-1)
      mysql-test/t/ctype_filesystem.test:
        Bug #37339: test case
      sql/mysqld.cc:
        Bug #37339: remember the correct character set for init_slave and init_connect
      sql/set_var.cc:
        Bug #37339: 
          - remember the character set of the relevant variables
          - implement storing and using the correct 
            character set
      sql/set_var.h:
        Bug #37339: implement storing and using the correct 
        character set
      sql/sql_show.cc:
        Bug #37339: implement storing and using the correct 
        character set
      171ef77f
    • Sergey Glukhov's avatar
      error code is changed to satisfy Win NT · d9b8c0d4
      Sergey Glukhov authored
      d9b8c0d4
    • Sergey Glukhov's avatar
      pushbuild failure fixes · ed62e890
      Sergey Glukhov authored
      mysql-test/r/perror-win.result:
        pushbuild failure fix
      mysql-test/t/perror-win.test:
        pushbuild failure fix
      sql/item_func.cc:
        pushbuild failure fix
      ed62e890
  8. 27 Nov, 2008 8 commits
    • Tatiana A. Nurnberg's avatar
      auto-merge · 21e8210a
      Tatiana A. Nurnberg authored
      21e8210a
    • Sergey Glukhov's avatar
      Bug#37284 Crash in Field_string::type() · 8a5273b8
      Sergey Glukhov authored
      The bug is repeatable with latest(1.0.1) InnoDB plugin on Linux, Win,
      If MySQL is compiled with valgrind there are errors about
      using of uninitialized variable(orig_table).
      The fix is to set field->orig_table correct value.
      
      
      mysql-test/r/innodb_mysql.result:
        test result
      mysql-test/t/innodb_mysql.test:
        test case
      sql/sql_base.cc:
        set field->orig_table to 'table' value because it may be bogus and
        it leads to crash on Field_string::type() function.
      8a5273b8
    • Sergey Glukhov's avatar
      removed unused variable · 3abcbf27
      Sergey Glukhov authored
      3abcbf27
    • Sergey Glukhov's avatar
      Bug#37460 Assertion failed: !table->file || table->file->inited == handler::NONE · b241dc21
      Sergey Glukhov authored
      enable uncacheable flag if we update a view with check option
      and check option has a subselect, otherwise, the check option
      can be evaluated after the subselect was freed as independent
      (See full_local in JOIN::join_free())
      
      
      mysql-test/r/subselect.result:
        test result
      mysql-test/t/subselect.test:
        test case
      sql/mysql_priv.h:
        added UNCACHEABLE_CHECKOPTION flag
      sql/sql_update.cc:
        enable uncacheable flag if we update a view with check option
        and check option has a subselect, otherwise, the check option
        can be evaluated after the subselect was freed as independent
        (See full_local in JOIN::join_free())
      b241dc21
    • Tatiana A. Nurnberg's avatar
      auto-merge · 1ef31b37
      Tatiana A. Nurnberg authored
      1ef31b37
    • Sergey Glukhov's avatar
      Bug#40365 Prepared statements may insert invalid dates. · 842b9cc4
      Sergey Glukhov authored
      set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled.
      
      
      sql/field.cc:
        set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled.
      tests/mysql_client_test.c:
        test case
      842b9cc4
    • Sergey Glukhov's avatar
      Bug#34825 perror on windows doesn't know about win32 error codes · 03a5f833
      Sergey Glukhov authored
      extended perror to enable printing of Win32 system errors
      
      
      extra/perror.c:
        extended perror to enable printing of Win32 system errors
      mysql-test/r/perror-win.result:
        test result
      mysql-test/t/perror-win.test:
        test case
      03a5f833
    • Tatiana A. Nurnberg's avatar
      auto-merge · f1b1fe91
      Tatiana A. Nurnberg authored
      f1b1fe91
  9. 26 Nov, 2008 1 commit
    • Tatiana A. Nurnberg's avatar
      Bug#37553: MySql Error Compare TimeDiff & Time · 9910b867
      Tatiana A. Nurnberg authored
      We pretended that TIMEDIFF() would always return positive results;
      this gave strange results in comparisons of the TIMEDIFF(low,hi)<TIME(0)
      type that rendered a negative result, but still gave false in comparison.
      We also inadvertantly dropped the sign when converting times to
      decimal.
      
      CAST(time AS DECIMAL) handles signs of the times correctly.
      TIMEDIFF() marked up as signed. Time/date comparison code switched to
      signed for clarity.
      
      mysql-test/r/func_sapdb.result:
        show that time-related comparisons work with negative
        time values now.
        show that converting time to DECIMAL no longer drops sign.
      mysql-test/t/func_sapdb.test:
        show that time-related comparisons work with negative
        time values now.
        show that converting time to DECIMAL no longer drops sign.
      sql/item_cmpfunc.cc:
        signed returns
      sql/item_cmpfunc.h:
        signed now (time/date < > =)
      sql/item_func.cc:
        signed now
      sql/item_timefunc.h:
        Functions such as TIMEDIFF() return signed results!
        The file-comments pretended we were doing that all along, anyway...
      sql/my_decimal.cc:
        heed sign when converting time to my_decimal;
        times may actually be negative!
        Needed for SELECT CAST(time('-73:42:12') AS DECIMAL);
      sql/mysql_priv.h:
        using signed for dates and times now
      9910b867
  10. 25 Nov, 2008 3 commits
  11. 24 Nov, 2008 3 commits
  12. 21 Nov, 2008 3 commits
    • Ramil Kalimullin's avatar
      Auto-merge · b08a6a61
      Ramil Kalimullin authored
      b08a6a61
    • Sergey Glukhov's avatar
      Bug#34760 Character set autodetection appears to fail · 20689fa1
      Sergey Glukhov authored
      the problem is the same as reported in bug#20835,
      so the fix is backport of bug#20835 patch.
      
      
      mysql-test/r/subselect.result:
        test result
      mysql-test/t/subselect.test:
        test case
      20689fa1
    • Ramil Kalimullin's avatar
      Fix for bug#36772: When using UTF8, CONVERT with GROUP BY · d16a9a68
      Ramil Kalimullin authored
      returns truncated results
      
      Problem: performig conversion from {INT, DECIMAL, REAL} to CHAR
      we incorrectly set its max length in some cases that may lead
      to truncated results returned.
      
      Fix: properly set CONVERT({INT, DECIMAL, REAL}, CHAR) result's
      max length.
      
      
      mysql-test/r/ctype_utf8.result:
        Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
        returns truncated results
          - test result.
      mysql-test/t/ctype_utf8.test:
        Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
        returns truncated results
          - test case.
      sql/item_timefunc.cc:
        Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
        returns truncated results
          - calculating Item_char_typecast::max_length use initial
        argument's charset mbmaxlen instead of from_cs->mbmaxlen,
        as from_cs may differ in some case (see comment above).
      d16a9a68
  13. 20 Nov, 2008 1 commit
    • Ramil Kalimullin's avatar
      Fix for bug#40875: Memory leak in FEDERATED handler · 82ee1ccb
      Ramil Kalimullin authored
      Problem: memory leak occurs when we open a federated table
      that has its share in the hash.
      
      Fix: free not used memory.
      
      Note: the fix should NOT be merged to 5.1 (the code changed).
      
      
      sql/ha_federated.cc:
        Fix for bug#40875: Memory leak in FEDERATED handler
          - free memory (tmp_share.scheme) allocated in the parse_url()
        if it isn't used anymore.
      82ee1ccb