1. 01 Oct, 2004 1 commit
    • unknown's avatar
      Support for TIMESTAMP columns holding NULL values. Unlike all other · c2a25521
      unknown authored
      column types TIMESTAMP is NOT NULL by default, so in order to have 
      TIMESTAMP column holding NULL valaues you have to specify NULL as
      one of its attributes (this needed for backward compatibility).
      
      Main changes:
      Replaced TABLE::timestamp_default_now/on_update_now members with
      TABLE::timestamp_auto_set_type flag which is used everywhere
      for determining if we should auto-set value of TIMESTAMP field 
      during this operation or not. We are also use Field_timestamp::set_time()
      instead of handler::update_timestamp() in handlers.
      
      
      mysql-test/r/type_timestamp.result:
        Added test for TIMESTAMP columns which are able to store NULL values.
      mysql-test/t/type_timestamp.test:
        Added test for TIMESTAMP columns which are able to store NULL values.
      sql/field.cc:
        Added support for TIMESTAMP fields holding NULL values.
        We don't need Field_timestamp::set_timestamp_offsets() anymore.
        Instead we need Field_timestamp::get_auto_set_type() function
        which will convert TIMESTAMP auto-set type stored in Field in 
        unireg_check to value from timestamp_auto_set_type_enum.
        (We can't replace this function with additional Field_timestamp member
        and some code in constructor because then we will have troubles
        with Field::new_field() method).
        We should also set field to not null in Field_timestamp::set_time() now.
      sql/field.h:
        Added support for TIMESTAMP fields holding NULL values.
        We don't need Field_timestamp::set_timestamp_offsets() anymore.
        Instead we need Field_timestamp::get_auto_set_type() function,
        which will convert TIMESTAMP auto-set type stored in Field in 
        unireg_check to value from timestamp_auto_set_type_enum.
        We also have to support NULL values in Field_timestamp::get_timestamp()
        function.
      sql/field_conv.cc:
        Added comment clarifying behavior in case of TIMESTAMP fields which are
        able to store NULL values.
      sql/ha_berkeley.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_heap.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_innodb.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_isam.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_isammrg.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_myisam.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_myisammrg.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/ha_ndbcluster.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now for determining 
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of 
        handler::update_timestamp().
      sql/handler.cc:
        handler::update_timestamp() is no longer needed since now we use
        Field_timestamp::set_time() instead.
        (we can't use handler::update_timestamp() anyway since field position
        only is not enough for TIMESTAMP fields which are able to store NULLs)
      sql/handler.h:
        handler::update_timestamp() is no longer needed since now we use
        Field_timestamp::set_time() instead.
      sql/item_timefunc.cc:
        Since now TIMESTAMP fields can hold NULL values we should take this into
        account.
      sql/sql_base.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now. 
        (Here we use Field_timestamp::get_auto_set_type() to setup its value
         before further statement execution).
      sql/sql_insert.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now.
      sql/sql_load.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now.
      sql/sql_parse.cc:
        Added support for TIMESTAMP fields holding NULL values.
        We should distinguish NULL default values and non-specified default
        values for such fields (because latter could mean DEFAULT NOW()
        ON UPDATE NOW() in some cases).
      sql/sql_show.cc:
        Added support for TIMESTAMP fields holding NULL values.
        Unlike all other fields these are NOT NULL by default
        so we have to specify NULL attribute explicitly for them.
      sql/sql_table.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now.
      sql/sql_update.cc:
        Now we use TABLE::timestamp_field_type instead of 
        TABLE::timestamp_default_now/on_update_now.
      sql/sql_yacc.yy:
        Added support for TIMESTAMP fields holding NULL values.
        Unlike all other fields these are NOT NULL by default
        (so we have to set NOT_NULL_FLAG properly for them).
      sql/table.h:
        Added timestamp_auto_set_type enum which values are used for indicating
        during which operations we should automatically set TIMESTAPM field
        value to current timestamp.
        TABLE: Replaced timestamp_default_now/on_update_now members with
        timestamp_auto_set_type flag (Now when TIMESTAMP field are able to 
        store NULL values, single position of field in record is not enough 
        for updating this field anyway).
      c2a25521
  2. 25 Sep, 2004 3 commits
    • unknown's avatar
      Results of WL#1856 "Conversion of client_test.c tests cases to mysqltest · c7b6603e
      unknown authored
      if possible"
              - many new test cases
              - more and improved comments
            New files: t/ps_7ndb.test       test suite for NDB tables
                       r/ps_7ndb.result     expected results
                       include/ps_conv.inc  conversion test cases
      + review comments and fixes.
      
      
      mysql-test/include/ps_create.inc:
        Rename of t_many_col_types -> t9
      mysql-test/include/ps_modify.inc:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Rename: t_many_col_types -> t9
        Cleanups and comments.
        New test cases (derived from client_test.c)
      mysql-test/include/ps_modify1.inc:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Rename: t_many_col_types -> t9
        Cleanups and comments.
        New test cases (derived from client_test.c)
      mysql-test/include/ps_query.inc:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Rename: t_many_col_types -> t9
        Cleanups and comments.
        New test cases (derived from client_test.c)
      mysql-test/include/ps_renew.inc:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Rename: t_many_col_types -> t9
      mysql-test/r/ps_1general.result:
        Results updated.
      mysql-test/r/ps_2myisam.result:
        Resutls updated.
      mysql-test/r/ps_3innodb.result:
        Results updated.
      mysql-test/r/ps_4heap.result:
        Results updated.
      mysql-test/r/ps_5merge.result:
        Results updated.
      mysql-test/r/ps_6bdb.result:
        Results updated.
      mysql-test/t/ps_1general.test:
        WL#1856 "Conversion of client_test.c tests cases to mysqltest if
         possible": new test cases added.
      mysql-test/t/ps_2myisam.test:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Call of file include/ps_conv.inc (with new test cases) and 
        fulltext test case added.
      mysql-test/t/ps_3innodb.test:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Call of file include/ps_conv.inc (with new test cases) added.
      mysql-test/t/ps_4heap.test:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Call of file include/ps_conv.inc (with new test cases) added.
      mysql-test/t/ps_5merge.test:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
        Call of file include/ps_conv.inc (with new test cases) added.
      mysql-test/t/ps_6bdb.test:
        WL#1856 Conversion of client_test.c tests cases to mysqltest if possible.
        Call of file include/ps_conv.inc (with new test cases) added.
      c7b6603e
    • unknown's avatar
      e619a0ae
    • unknown's avatar
      Incorporating new faster string->number converter functions · 8025aaaa
      unknown authored
      into MY_CHARSET_INFO structure.
      
      8025aaaa
  3. 24 Sep, 2004 5 commits
    • unknown's avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1 · 07a74ec2
      unknown authored
      into deer.(none):/home/hf/work/mysql-4.1.5532
      
      07a74ec2
    • unknown's avatar
      Merging · 38464f67
      unknown authored
      38464f67
    • unknown's avatar
      Merging · e9a2c8c4
      unknown authored
      e9a2c8c4
    • unknown's avatar
      Fix alignment. · 306e37e6
      unknown authored
      306e37e6
    • unknown's avatar
      logging_ok: · 15ef828b
      unknown authored
        Logging to logging@openlogging.org accepted
      sql_show.cc, type_enum.test, type_enum.result:
        Bug #5628 German characters in field-defs will be '?' with some table definitions
      
      
      mysql-test/r/type_enum.result:
        Bug #5628 German characters in field-defs will be '?' with some table definitions
      mysql-test/t/type_enum.test:
        Bug #5628 German characters in field-defs will be '?' with some table definitions
      sql/sql_show.cc:
        Bug #5628 German characters in field-defs will be '?' with some table definitions
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      15ef828b
  4. 23 Sep, 2004 8 commits
    • unknown's avatar
      0a8a5c62
    • unknown's avatar
      A fix and test case for bug#5688 "Upgraded 4.1.5 Server seg faults" · a99f6791
      unknown authored
      
      mysql-test/r/ps.result:
        Test results fixed: the test case for bug#5688 "Upgraded 4.1.5 Server 
        seg faults"
      mysql-test/t/ps.test:
        Test case for bug#5688 "Upgraded 4.1.5 Server seg faults"
      sql/item_cmpfunc.cc:
        A fix for bug#5688 "Upgraded 4.1.5 Server seg faults":
        fix just another place where we use wrong memory root for an Item
        in statement prepare.
        In addition, make the check for charsets in Item_bool_func2
        more generic (fixes the test case when we use LIKE to compare BLOBs
        with TEXT data).
      a99f6791
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 6cb4aca5
      unknown authored
      into mysql.com:/home/dlenev/src/mysql-4.1-memroot
      
      6cb4aca5
    • unknown's avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1 · 7057c939
      unknown authored
      into deer.(none):/home/hf/work/mysql-4.1.5371
      
      7057c939
    • unknown's avatar
      Fix for BUG#5705: "SET CHARATER_SET_SERVERetc will be lost if STOP SLAVE before following query": · 8df3fead
      unknown authored
      we do not increment rli->group_master_log_pos if we are just after a SET ONE_SHOT (it's not a standalone event)
      
      
      mysql-test/r/rpl_charset.result:
        testing interruption of slave SQL thread between SET CHARACTER_SET_SERVER... and the companion INSERT.
      mysql-test/t/rpl_charset.test:
        testing interruption of slave SQL thread between SET CHARACTER_SET_SERVER... and the companion INSERT.
      sql/log_event.cc:
        we do not increment rli->group_master_log_pos if we are just after a SET
        ONE_SHOT, because SET ONE_SHOT should not be separated from its following
        updating query.
      8df3fead
    • unknown's avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1 · 8cf9cabb
      unknown authored
      into deer.(none):/home/hf/work/mysql-4.1.5371
      
      8cf9cabb
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 972fc5e6
      unknown authored
      into mysql.com:/home/dlenev/src/mysql-4.1-memroot
      
      
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      972fc5e6
    • unknown's avatar
      Implementation of Monty's idea about clear_alloc_root() optimization and cleanup of work · cf9e30b8
      unknown authored
      with memory roots in THD/Statement/Item_arena.
      Added assertions preventing memory allocation on bzero'ed MEM_ROOT since it is worked by 
      pure luck and was very ineffective.
      
      
      include/my_sys.h:
        Reimplementation of Monty's optimization of clear_alloc_root().
        Now clear_alloc_root() can be used only for detaching memory associated with MEM_ROOT
        (e.g. to avoid its freeing). It can not be used for MEM_ROOT initialization any longer 
        (it was bad idea anyway since memory allocation on such MEM_ROOT was very ineffective 
        and worked by pure luck).
        Introduced ALLOC_ROOT_MIN_BLOCK_SIZE constant.
      mysys/my_alloc.c:
        Added description of init_alloc_root().
        Added assertions to alloc_root() and reset_root_defaults() so now they can only be used
        on previosly initialized MEM_ROOT. (It worked for bzeroed MEM_ROOT before but 
        by pure luck and very inefficiently). Calling free_root() on bzero'ed MEM_ROOT
        is still ok (we can't remove this easily because of static MEM_ROOTs).
        Also now using ALLOC_ROOT_MIN_BLOCK_SIZE constant inside these functions.
      sql/opt_range.cc:
        Fixed get_quick_select_for_ref() function to not use bzero'ed MEM_ROOT for allocation.
        Also QUICK_RANGEs created in this function should be created in memory root of QUICK_SELECT.
      sql/sql_class.cc:
        Implementation of Monty's idea about clear_alloc_root() optimization and cleanup of work 
        with memory roots in THD/Statement/Item_arena.
        Now we are always initing THD::transaction.mem_root and THD::mem_root in THD constructor 
        (without memory allocation and with minimal block size) and then later change their
        parameters in THD::init_for_queries() (this is partially because we can't allocate anything
        on bzero'ed memory roots anymore).
        Item_arena() constructor is now trivial and is used only then Item_arena is created as backup
        storage for other Item_arena (we use Item_arena(bool) now if it is part of Statement).
        Both trivial Item_arena constructor and destructor are now inline.
        Removed unneeded clear_alloc_root from Item_arena::restore_backup_item_arena().
      sql/sql_class.h:
        Both trivial Item_arena constructor and destructor are now inline.
        Commented various Item_arena constructors.
      cf9e30b8
  5. 22 Sep, 2004 2 commits
    • unknown's avatar
      Additional fix for bug #5136 (Geometry object is corrupted when queried) · 57517f3a
      unknown authored
      CREATE TABLE t1 SELECT POINT(1,2); fixed
      
      
      mysql-test/r/gis.result:
        Appropriate test result
      mysql-test/t/gis.test:
        test case
      sql/item_geofunc.cc:
        Item_geometry_func::fix_lengths_and_dec implementation
        several fix_length_and_dec's not needed now
      sql/item_geofunc.h:
        Item_geometry_func class presented
      57517f3a
    • unknown's avatar
      A fix and test case for Bug#5315 "mysql_change_user() doesn't free · 0d44f8d4
      unknown authored
      prepared statements."
      
      
      include/hash.h:
        New declaration for hash_reset() function. The old version was not used.
      libmysql/client_settings.h:
        Declaration for mysql_detach_stmt_list().
      libmysql/libmysql.c:
        Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
        add call to mysql_detach_stmt_list(prepared statements) to
        mysql_change_user(): all statements are freed by server, so client
        counterparts need to be marked as not usable.
      mysys/hash.c:
        Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
        implementation of hash_reset(), which frees all hash elements
        and prepares the hash for reuse.
      sql-common/client.c:
        Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
        implementation of mysql_detach_stmt_list(): zero connection pointer
        in given statement list, thus marking given statements as not usable.
      sql/sql_class.cc:
        Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
        reset prepared statements map in THD::change_user().
      sql/sql_class.h:
        Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
        implementation of Statement_map::reset().
        A little cleanup of ~Statement_map(): first empty names_hash, as st_hash
        has a free function, which will delete statements.
      tests/client_test.c:
        A test case for bug #5315 "mysql_change_user() doesn't free prepared
        statements".
      0d44f8d4
  6. 21 Sep, 2004 6 commits
    • unknown's avatar
      Merge lgrimmer@build.mysql.com:/home/bk/mysql-4.1 · daae7f4a
      unknown authored
      into mysql.com:/space/my/mysql-4.1
      
      daae7f4a
    • unknown's avatar
      bug#5591 · 6d69d56e
      unknown authored
      6d69d56e
    • unknown's avatar
      Merge baker@bk-internal.mysql.com:/home/bk/mysql-4.1 · 616ee34c
      unknown authored
      into private-client-ip-101.oz.net:/Users/brian/mysql/mysql-4.1
      
      
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      616ee34c
    • unknown's avatar
      bug#5617 · 0ab9b32d
      unknown authored
      allow blank lines in Ndb.cfg files
      
      0ab9b32d
    • unknown's avatar
      - Bumped up version number: 4.1.5 -> 4.1.6 (still keeping the "gamma" · e31116d0
      unknown authored
         label for now)
       - tagged ChangeSet 1.2015.1.10 as "mysql-4.1.5"
      
      
      configure.in:
         - Bumped up version number: 4.1.5 -> 4.1.6 (still keeping the "gamma"
           label for now)
      e31116d0
    • unknown's avatar
      The major change for this changeset is the addition of code to handle: · ba1b4bfc
      unknown authored
      OPTIMIZE TABLE <archive table>
      
      This recompresses the table, thus removing any additional gzip headers caused by opening/closing or flushing the table.
      
      
      mysql-test/r/archive.result:
        Added optimize test case for archive engine.
      mysql-test/t/archive.test:
        Added test case for OPTIMIZE table <archive table>
      sql/examples/ha_archive.cc:
        The big change was the addition of optimize() call to allow tables to be recompressed (so if you have been reading/writing/reading/writing and ending up with larger files then you should, this will solve it). Though adding this feature is going to make it a real headache to add row level locking. 
        Also fixed bug reported by JD where storage engine code was not functioning (this of course was because I didn't check for the propper return value for hash_init). Removed BROKEN_GZIP ifdef since there was no way to enable it.
      sql/examples/ha_archive.h:
        Added optimize() method.
      ba1b4bfc
  7. 20 Sep, 2004 9 commits
    • unknown's avatar
      fix updated signature · 6acfa569
      unknown authored
      6acfa569
    • unknown's avatar
      Merge msvensson@build.mysql.com:/home/bk/mysql-4.1 · cd5bd57b
      unknown authored
      into neptunus.(none):/home/magnus/mysql/mysql-4.1
      
      cd5bd57b
    • unknown's avatar
      Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1 · 663e06cf
      unknown authored
      into mysql.com:/GORDON/MySQL/mysql-4.1/src
      
      663e06cf
    • unknown's avatar
      These modifications were part of WL#1856 Conversion of client_test.c tests... · 40d6c6e2
      unknown authored
      These modifications were part of WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
      
      They are separated from the other WL#1856 stuff, because they improve the behaviour of the current tests.  
      
      Make the result sets (order of rows) more predictable by using ORDER BY.
      
      
      mysql-test/include/ps_modify.inc:
        Make the result sets more predictable by using ORDER BY
      mysql-test/include/ps_modify1.inc:
        Make the result sets more predictable by using ORDER BY
      mysql-test/r/ps_2myisam.result:
        updated results
      mysql-test/r/ps_3innodb.result:
        updated results
      mysql-test/r/ps_4heap.result:
        updated results
      mysql-test/r/ps_5merge.result:
        updated results
      mysql-test/r/ps_6bdb.result:
        updated results
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      40d6c6e2
    • unknown's avatar
      Ues buf pointer in get_ndb_value · a5898694
      unknown authored
      Merge fixes
      
      
      mysql-test/r/ndb_insert.result:
        Correct test cases and result after merge
      mysql-test/t/ndb_insert.test:
        Correct test cases and result after merge
      sql/ha_ndbcluster.cc:
        Correct get_error_message after merge
        Use buf pointer in get_ndb_value
      a5898694
    • unknown's avatar
      bug#5659 · 4e61c525
      unknown authored
      uninit variable
      
      
      ndb/src/kernel/vm/Configuration.cpp:
        init variable
      4e61c525
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1 · b55edd48
      unknown authored
      into mysql.com:/home/jonas/src/mysql-4.1
      
      b55edd48
    • unknown's avatar
      Merged new ndb_insert.test and .result · 158063b6
      unknown authored
      
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/ha_ndbcluster.h:
        Auto merged
      mysql-test/r/ndb_insert.result:
        Merge new test cases
      mysql-test/t/ndb_insert.test:
        Merge new test cases
      158063b6
    • unknown's avatar
      Merge msvensson@build.mysql.com:/home/bk/mysql-4.1 · ce28a99c
      unknown authored
      into neptunus.(none):/home/magnus/mysql/mysql-4.1
      
      ce28a99c
  8. 17 Sep, 2004 1 commit
    • unknown's avatar
      A fix and test case for bug#5510 "inserting Null in AutoIncrement primary · 4148c9f9
      unknown authored
      key Column Fails".
      
      
      mysql-test/r/ps.result:
        Test results updated: a test case for Bug#5510 "inserting Null in 
        AutoIncrement primary key Column Fails".
      mysql-test/r/ps_2myisam.result:
        Bug#5510: a different warning in case of NULL->default truncation.This is 
        OK, the new warning is the same as produced by conventional execution.
      mysql-test/r/ps_3innodb.result:
        Bug#5510: a different warning in case of NULL->default truncation.This is 
        OK, the new warning is the same as produced by conventional execution.
      mysql-test/r/ps_4heap.result:
        Bug#5510: a different warning in case of NULL->default truncation.This is 
        OK, the new warning is the same as produced by conventional execution.
      mysql-test/r/ps_5merge.result:
        Bug#5510: a different warning in case of NULL->default truncation.This is 
        OK, the new warning is the same as produced by conventional execution.
      mysql-test/r/ps_6bdb.result:
        Bug#5510: a different warning in case of NULL->default truncation.This is 
        OK, the new warning is the same as produced by conventional execution.
      mysql-test/t/ps.test:
        A test case for Bug#5510 "inserting Null in AutoIncrement primary key Column 
        Fails".
      sql/item.cc:
        A fix for bug#5510 "inserting Null in AutoIncrement primary key Column 
        Fails": use proper Field API function for NULL placholeders.
      4148c9f9
  9. 16 Sep, 2004 5 commits