1. 16 May, 2011 1 commit
    • Michael Widenius's avatar
      Added more asserts to find out how maria.maria-big could have failed in buildbot. · 8c5e18c9
      Michael Widenius authored
      
      storage/maria/ma_loghandler.c:
        Added assert if we give wrong type to translog_write_record().
        (This should be impossible, but the failure record in buildbot also looks impossible so we need more information...)
      storage/maria/ma_loghandler.h:
        Added prototype for check_translog_description_table()
      storage/maria/unittest/ma_loghandler_examples.c:
        Call check_translog_description_table() to register number of log_record_type_descriptor[] events.
      8c5e18c9
  2. 13 May, 2011 1 commit
  3. 12 May, 2011 1 commit
  4. 11 May, 2011 5 commits
    • Michael Widenius's avatar
      Fixed bug when accessing wrong decimal value in dynamic string (Fixed lp:781233) · 4c81cef7
      Michael Widenius authored
      Store decimal 0.0 in zero bytes in dynamic strings.
      mysqltest: Don't ignore error from mysql_stmt_fetch;  This could cause rows to be missing from log when running with --ps-protocol
      Fixed wrong result length for CAST(... as TIME)
      
      
      
      
      
      
      client/mysqltest.cc:
        Don't ignore error from mysql_stmt_fetch;  This could cause rows to be missing from log when running with --ps-protocol
      libmysql/libmysql.c:
        The max length for a TIME column is 17, not 15.
      mysql-test/r/dyncol.result:
        More tests
      mysql-test/t/dyncol.test:
        More tests
      mysys/ma_dyncol.c:
        Check content of decimal value on read and store to not get assert in decimal_bin_size().
        Store decimal 0.0 in zero bytes in dynamic strings. This also solves a problem where decimal 0 had different internal representations.
      sql-common/my_time.c:
        Fixed DBUG_PRINT
      sql/item_timefunc.h:
        Fixed wrong result length for CAST(... as TIME). This was the cause of failures in buildbot when doing cast(... as time);
      sql/protocol.cc:
        More DBUG_PRINT
      4c81cef7
    • Michael Widenius's avatar
      automatic merge · 3a537679
      Michael Widenius authored
      3a537679
    • Michael Widenius's avatar
      Fixed a memory overrun in dynamic columns when sending in a mailformed (too... · f940c2ca
      Michael Widenius authored
      Fixed a memory overrun in dynamic columns when sending in a mailformed (too short in this case) string.
      
      mysql-test/t/dyncol.test:
        Added test case for mailformed string usage
      mysys/ma_dyncol.c:
        Added test for wrong dynamic string data
      f940c2ca
    • Michael Widenius's avatar
      Fixed compiler warnings and test cases problems found by buildbot · 8d52c2cf
      Michael Widenius authored
      
      mysql-test/r/dyncol.result:
        Updated test results
      mysql-test/r/index_intersect.result:
        Updated results
      mysql-test/r/index_intersect_innodb.result:
        Updated results
      mysql-test/t/dyncol.test:
        Added replace_result for floating point results that are different on windows
        Added round() around a result to get same result on all platforms.
      mysql-test/t/index_intersect.test:
        Added replace_result to fix that index_merge may put key names in different order.
      mysys/ma_dyncol.c:
        Fixed compiler warnings on Solaris
      sql/key.cc:
        Fixed compiler warnings on Solaris
      sql/mysqld.cc:
        Fixed compiler warning on windows
      support-files/compiler_warnings.supp:
        Suppressed an unintersting warning on Solaris
      8d52c2cf
    • Vladislav Vaintroub's avatar
      Fix compile error by changing #include <mysys_priv.h> to #include "mysys_priv.h" · c735c1b7
      Vladislav Vaintroub authored
      Fix various warnings about conversion from bigger to smaller integer types in assignments
      c735c1b7
  5. 10 May, 2011 2 commits
    • Michael Widenius's avatar
      Fixed all reported bugs for dynamic columns. · 052d1bfb
      Michael Widenius authored
      Bugs fixed:
      - Added automatic detection of unsigned arguments to COLUMN_CREATE()
      - If string length is not know for COLUMN_GET() use MAX_DYNAMIC_COLUMN_LENGTH instead of MAX_FIELD_BLOBLENGTH
      - null_value flag was not propery reset for COLUMN_LIST() and COLUMN_CREATE() which could lead to crashes later:
      - lp:778905 Assertion `value->year <= 9999' failed in dynamic_column_date_store
      - lp:778912 Assertion `field_pos < field_count' failed in Protocol_text::store in maria-5.3-mwl34
      
      include/ma_dyncol.h:
        Added define for max dynamic column length.
      mysql-test/r/cast.result:
        Added test of cast big unsigned int to signed (this test case was missing)
      mysql-test/r/dyncol.result:
        Added tests from reported bugs
        Added testing of automatic store of signed/unsigned integers
      mysql-test/t/cast.test:
        Added test of cast big unsigned int to signed (this test case was missing)
      mysql-test/t/dyncol.test:
        Added tests from reported bugs
        Added testing of automatic store of signed/unsigned integers
      sql/item.cc:
        Added assert to catch cases where null_value is not set properly
      sql/item_strfunc.cc:
        Added automatic detection of unsigned arguments to COLUMN_CREATE()
        COLUMN_GET() returned wrong value for illegal strings which lead to assert later
        null_value flag was not propery reset for COLUMN_LIST() and COLUMN_CREATE() which could lead to crashes later.
      sql/item_strfunc.h:
        If string length is not know for COLUMN_GET() use MAX_DYNAMIC_COLUMN_LENGTH
      052d1bfb
    • Michael Widenius's avatar
      Merge with MariaDB 5.2 · f34be189
      Michael Widenius authored
      f34be189
  6. 09 May, 2011 2 commits
    • Michael Widenius's avatar
      Make event stop code even more robust. · 8882d71f
      Michael Widenius authored
      (Test failed if we added my_sleep(200000) in event_queue::cond_wait() just before pthread_cond_wait();  Not likely scenario but better to get that fixed too)
      8882d71f
    • Michael Widenius's avatar
      mysqltest: Write command to be executed to the log BEFORE executing the command. · 4cb68c0e
      Michael Widenius authored
      Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF 
      
      client/mysqltest.cc:
        Write command to be executed to the log BEFORE executing the command.
        This makes it easier to debug crashes as the log will contain the fatal command.
      mysql-test/r/mysqltest.result:
        Updated results (we now get more things logged)
      sql/event_queue.cc:
        Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF.
        The reason was that a kill signal could be sent between last check of thd->killed and before thd->enter_cond() in which case the signal
        would be missed and we would be stuck in Event_scheduler::stop() forever.
      4cb68c0e
  7. 08 May, 2011 5 commits
    • Michael Widenius's avatar
      Merge with main 5.3 · 03483e7b
      Michael Widenius authored
      03483e7b
    • Michael Widenius's avatar
      Fixed compiler warnings · e843297d
      Michael Widenius authored
      e843297d
    • Michael Widenius's avatar
      Adding support for Dynamic columns (WL#34): · 5ab92b1f
      Michael Widenius authored
      - COLUMN_CREATE(column_nr, value, [column_nr,value]...)
      - COLUMN_ADD(blob,column_nr, value, column_nr,value]...)
      - COLUMN_DELETE(blob, column_nr, column_nr...)
      - COLUMN_EXISTS(blob, column_nr)
      - COLUMN_LIST(blob, column_nr)
      - COLUMN_GET(string, column_nr AS type)
      
      Added cast(X as DOUBLE) and cast(x as INT)
      Better warning and error messages for wrong cast's
      Created some sub functions to simplify and reuse code.
      Added a lot of conversation functions with error/warnings for what went wrong.
      Fixed some issues when casting time to datetime.
      Added functions to dynamic strings and Strings to allow one to move a string buffer from dynamic strings to String (to save malloc+ copy)
      Added dynamic columns library to libmysqlclient
      
      
      include/Makefile.am:
        Added ma_dyncol.h
      include/decimal.h:
        Added 'const' to arguments for some functions.
      include/my_sys.h:
        Added dynstr_reassociate()
      include/my_time.h:
        Added TIME_SUBSECOND_RANGE
        Added double_to_datetime()
        Added flag argument to str_to_time()
      libmysql/CMakeLists.txt:
        Added mysys/ma_dyncol.c
      libmysql/Makefile.shared:
        Added ma_dyncol
      libmysql/libmysql.c:
        Added argument to str_to_time()
      mysql-test/r/bigint.result:
        Better error messages
      mysql-test/r/cast.result:
        Better warning and error messages
        A lot of new cast() tests
      mysql-test/r/func_math.result:
        Better warning messages
      mysql-test/r/func_str.result:
        Better warning messages
      mysql-test/r/func_time.result:
        Better warning messages
      mysql-test/r/sp-vars.result:
        Better warning messages
      mysql-test/r/strict.result:
        Better warning messages
        New test result
      mysql-test/r/type_newdecimal.result:
        Better warning messages
      mysql-test/r/warnings.result:
        Better warning messages
      mysql-test/suite/funcs_1/r/innodb_func_view.result:
        Updated results after better cast warnings
      mysql-test/suite/funcs_1/r/memory_func_view.result:
        Updated results after better cast warnings
      mysql-test/suite/funcs_1/r/myisam_func_view.result:
        Updated results after better cast warnings
      mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test:
        Added begin...commit to speed up test.
      mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
        Added begin...commit to speed up test.
      mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
        Added begin...commit to speed up test.
      mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
        Added begin...commit to speed up test.
      mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
        Added begin...commit to speed up test.
      mysql-test/suite/parts/r/rpl_partition.result:
        Added begin...commit to speed up test.
      mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
        Removed duplicated --big_test
      mysql-test/suite/parts/t/rpl_partition.test:
        Added begin...commit to speed up test.
      mysql-test/suite/pbxt/r/cast.result:
        Updated results after better cast warnings
      mysql-test/suite/pbxt/r/func_str.result:
        Updated results after better cast warnings
      mysql-test/suite/pbxt/r/type_newdecimal.result:
        Updated results after better cast warnings
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
        Added begin...commit to speed up test.
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        Added begin...commit to speed up test.
      mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result:
        More warnings
      mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result:
        More warnings
      mysql-test/t/cast.test:
        A lot of new cast() tests
      mysql-test/t/strict.test:
        Added new test
      mysys/CMakeLists.txt:
        Added ma_dyncol.c
      mysys/Makefile.am:
        Added ma_dyncol.c
      mysys/string.c:
        Added dynstr_reassociate() to move a buffer from dynamic_strings to some other allocator
      sql-common/my_time.c:
        Added 'fuzzydate' flag to str_to_time()
        Added support for microseconds to my_time_to_str() and my_datetime_to_str()
        Reset second_parts in number_to_datetime()
        Added double_to_datetime()
      sql/field.cc:
        Added double_to_longlong() and truncate_double() to simplify and reuse code
      sql/field.h:
        New prototypes
      sql/item.cc:
        Changed Item::get_date(MYSQL_TIME *ltime,uint fuzzydate) to be aware of type of argument.
        (Needed to make it microsecond safe and get better warnings).
        Updated call to str_to_time_with_warn()
      sql/item.h:
        Added struct st_dyncall_create_def used by dynamic columns
        Added virtual bool dynamic_result() to tell if type of argument may change over calls.
      sql/item_cmpfunc.cc:
        Added Item_func_dyncol_exists()
      sql/item_cmpfunc.h:
        Added class Item_func_dyncol_exists
      sql/item_create.cc:
        Added get_length_and_scale() to simplify other functions
        Simplified and extended create_func_cast()
        Added support for cast(X as double(X,Y))
        Added functions to create dynamic column functions.
      sql/item_create.h:
        Added prototypes
      sql/item_func.cc:
        Extended cast functions Item_func_signed() and Item_func_unsigned() to work with dynamic types
        Added Item_double_typecast()
      sql/item_func.h:
        Added class Item_double_typecast()
      sql/item_strfunc.cc:
        Added functions for COLUMN_CREATE(), COLUMN_ADD(), COLUMN_GET() and COLUMN_LIST()
      sql/item_strfunc.h:
        Added classes for COLUMN_CREATE(), COLUMN_ADD(), COLUMN_GET() and COLUMN_LIST()
      sql/item_timefunc.cc:
        Added flag argument to str_to_time_with_warn()
        Updated Item_char_typecast() to handle result type that may change between calls (for dynamic columns)
        Added Item_time_typecast::get_date() to ensure that we cast a datetime to time properly.
      sql/item_timefunc.h:
        Added get_date() to Item_time_typecast() to allow proper results for casting time to datetime
      sql/lex.h:
        Added new SQL function names
      sql/my_decimal.cc:
        Added 'const' to some arguments.
        Better error message in case of errors (we now print out the wrong value)
        Added my_decimal2int()
      sql/my_decimal.h:
        Moved some constants to my_decimal_limits.h
        Updated prototypes.
        Made my_decimal2int() a function as it's rather long (no reason to have it inline)
        Added decimal2my_decimal() function.
      sql/mysql_priv.h:
        Prototypes for new functions
      sql/share/errmsg.txt:
        New error messages for wrong casts and dynamic columns
      sql/sql_acl.cc:
        Fixed indentation
      sql/sql_base.cc:
        Added dynamic_column_error_message()
      sql/sql_string.h:
        Added reassociate() to move a buffer to be owned by String object.
      sql/sql_yacc.yy:
        Added syntax for COLUMN_ functions.
      sql/time.cc:
        Updated str_to_datetime_with_warn() flag argument to same type as other functions
        Added conversion flag to str_to_time_with_warn() (Similar to all datetime functions)
        Added conversion functions with warnings: double_to_datetime_with_warn() and decimal_to_datetime_with_warn()
      strings/decimal.c:
        Added 'const' to arguments for some functions.
      unittest/mysys/Makefile.am:
        Added test for dynamic columns code
      5ab92b1f
    • Michael Widenius's avatar
      Automatic merge · a50a5f64
      Michael Widenius authored
      a50a5f64
    • Michael Widenius's avatar
      Automatic merge with 5.1 · 28f708e1
      Michael Widenius authored
      28f708e1
  8. 07 May, 2011 2 commits
  9. 06 May, 2011 1 commit
  10. 05 May, 2011 5 commits
  11. 04 May, 2011 15 commits