1. 01 Jul, 2007 2 commits
    • unknown's avatar
      Post-merge fix. · f9d36194
      unknown authored
      f9d36194
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 26a2b004
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt
      
      
      mysql-test/r/binary.result:
        Auto merged
      mysql-test/r/ctype_collate.result:
        Auto merged
      mysql-test/r/ctype_utf8.result:
        Auto merged
      mysql-test/t/binary.test:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      mysql-test/t/ctype_utf8.test:
        Auto merged
      sql/field_conv.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/item_sum.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql-common/client.c:
        Auto merged
      sql/sql_select.h:
        Auto merged
      sql/table.cc:
        Auto merged
      storage/myisam/mi_open.c:
        Auto merged
      strings/ctype-simple.c:
        Auto merged
      mysql-test/r/create.result:
        Manual merge.
      mysql-test/r/subselect.result:
        Manual merge.
      mysql-test/r/type_enum.result:
        Manual merge.
      mysql-test/t/type_enum.test:
        Manual merge.
      mysql-test/include/mix1.inc:
        Manual merge.
      mysql-test/r/innodb_mysql.result:
        Manual merge.
      mysql-test/t/subselect.test:
        Manual merge.
      sql/sql_parse.cc:
        Manual merge.
      storage/myisam/mi_key.c:
        Manual merge.
      26a2b004
  2. 30 Jun, 2007 2 commits
  3. 29 Jun, 2007 10 commits
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29205 · a89259fa
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      a89259fa
    • unknown's avatar
      Fixed bug #29205. · db397d16
      unknown authored
      When a UNION statement forced conversion of an UTF8
      charset value to a binary charset value, the byte
      length of the result values was truncated to the
      CHAR_LENGTH of the original UTF8 value.
      
      
      sql/item.cc:
        Fixed bug #29205.
        The calculation of data length was modified in
        the Item_type_holder::join_types method to take into
        account possible conversion of a multibyte charset
        value to a binary charset value, when each
        multibyte character is converted into a sequence
        of bytes (not to a single byte of binary charset).
      mysql-test/t/ctype_utf8.test:
        Updated test case for bug #29205.
      mysql-test/r/ctype_utf8.result:
        Updated test case for bug #29205.
      db397d16
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 6a00ce71
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/29261-bug-5.0-opt-mysql
      
      
      6a00ce71
    • unknown's avatar
      Bug#29261: Sort order of the collation wasn't used when comparing trailing · 4772a012
      unknown authored
      spaces.
      
      When the my_strnncollsp_simple function compares two strings and one is a prefix
      of another then this function compares characters in the rest of longer key
      with the space character to find whether the longer key is greater or less.
      But the sort order of the collation isn't used in this comparison. This may
      lead to a wrong comparison result, wrongly created index or wrong order of the
      result set of a query with the ORDER BY clause.
      
      Now the my_strnncollsp_simple function uses collation sort order to compare
      the characters in the rest of longer key with the space character.
      
      
      mysql-test/t/ctype_collate.test:
        Added a test case for the bug#29261: Sort order of the collation wasn't used
        when comparing trailing spaces.
      mysql-test/r/ctype_collate.result:
        Added a test case for the bug#29261: Sort order of the collation wasn't used
        when comparing trailing spaces.
      strings/ctype-simple.c:
        Bug#29261: Sort order of the collation wasn't used when comparing trailing
        spaces.
        Now the my_strnncollsp_simple function uses collation sort order to compare
        the characters in the rest of longer key with the space character.
      4772a012
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 33eb22a3
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B27333-gcov-5.0-opt
      
      
      33eb22a3
    • unknown's avatar
      Bug#27333: subquery grouped for aggregate of outer · c2e961cf
      unknown authored
      query / no aggregate of subquery
       The optimizer counts the aggregate functions that 
       appear as top level expressions (in all_fields) in 
       the current subquery. Later it makes a list of these
       that it uses to actually execute the aggregates in
       end_send_group().
       That count is used in several places as a flag whether
       there are aggregates functions.
       While collecting the above info it must not consider
       aggregates that are not aggregated in the current 
       context. It must treat them as normal expressions 
       instead. Not doing that leads to incorrect data about
       the query, e.g. running a query that actually has no
       aggregate functions as if it has some (and hence is
       expected to return only one row).
       Fixed by ignoring the aggregates that are not aggregated
       in the current context. 
       One other smaller omission discovered and fixed in the 
       process : the place of aggregation was not calculated for
       user defined functions. Fixed by calling 
       Item_sum::init_sum_func_check() and 
       Item_sum::check_sum_func() as it's done for the rest of 
       the aggregate functions.
      
      
      mysql-test/r/subselect.result:
        Bug #27333: test case
      mysql-test/t/subselect.test:
        Bug #27333: test case
      sql/item_subselect.cc:
        Bug#27333: need select_lex to filter out
         aggregates that are not aggregated in
         the current select.
      sql/item_sum.cc:
        Bug#27333: need select_lex to filter out
         aggregates that are not aggregated in
         the current select.
      sql/item_sum.h:
        Bug#27333: calculate the place of 
         aggregation for user defined functions.
      sql/sql_select.cc:
        Bug#27333: When counting the aggregated functions
         and collecting a list of them we must not consider
         the aggregates that are not aggregated in the local
         context as "local" : i.e. we must treat them as 
         normal functions and not add them to the aggregate
         functions list.
      sql/sql_select.h:
        Bug#27333: need select_lex to filter out
         aggregates that are not aggregated in
         the current select.
      c2e961cf
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · b70c486e
      unknown authored
      into  mysql.com:/home/hf/work/29247/my51-29247
      
      
      sql-common/client.c:
        Auto merged
      sql/handler.h:
        Auto merged
      b70c486e
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 73023608
      unknown authored
      into  mysql.com:/home/hf/work/29247/my50-29247
      
      
      sql-common/client.c:
        Auto merged
      73023608
    • unknown's avatar
      Merge mysql.com:/home/hf/work/29252/my51-29252 · 3e7f28ed
      unknown authored
      into  mysql.com:/home/hf/work/29247/my51-29247
      
      
      3e7f28ed
    • unknown's avatar
      Merge mysql.com:/home/hf/work/29247/my50-29247 · 09e78f80
      unknown authored
      into  mysql.com:/home/hf/work/29247/my51-29247
      
      
      sql-common/client.c:
        Auto merged
      09e78f80
  4. 28 Jun, 2007 4 commits
    • unknown's avatar
      Bug #29157: UPDATE, changed rows incorrect · ba4682ae
      unknown authored
      Sometimes the number of really updated rows (with changed
      column values) cannot be determined at the server level
      alone (e.g. if the storage engine does not return enough
      column values to verify that). So the only dependable way
      in such cases is to let the storage engine return that
      information if possible.
      Fixed the bug at server level by providing a way for the 
      storage engine to return information about wether it 
      actually updated the row or the old and the new column 
      values are the same. It can do that by returning 
      HA_ERR_RECORD_IS_THE_SAME in ha_update_row().
      Note that each storage engine may choose not to try to
      return this status code, so this behaviour remains 
      storage engine specific.
      
      
      include/my_base.h:
        Bug #29157: handle the row not updated special return value
      sql/log_event.cc:
        Bug #29157: handle the row not updated special return value
      sql/sp.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_acl.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_insert.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_servers.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_update.cc:
        Bug #29157: handle the row not updated special return value
      ba4682ae
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · 26bed2a6
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26564-5.1-opt
      
      
      26bed2a6
    • unknown's avatar
      events_bugs.test didn't remove all the objects it created · 3f9bf925
      unknown authored
      what caused some consequitive tests failures
      
      
      mysql-test/r/events_bugs.result:
        test result fixed
      mysql-test/t/events_bugs.test:
        typo fixed, event removed
      3f9bf925
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · b728d0a6
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26642-5.0-opt
      
      
      b728d0a6
  5. 27 Jun, 2007 5 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · 28187da7
      unknown authored
      into  mysql.com:/home/hf/work/29156/my51-29156
      
      
      28187da7
    • unknown's avatar
      Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 00b3d3c2
      unknown authored
      into  dl145s.mysql.com:/dev/shm/mhansson/my50-bug28677
      
      
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      00b3d3c2
    • unknown's avatar
      Bug #26642: create index corrupts table definition in .frm · 0c31d0bb
      unknown authored
        
        Thanks to Martin Friebe for finding and submitting a fix for this bug!
        
        A table with maximum number of key segments and maximum length key name
        would have a corrupted .frm file, due to an incorrect calculation of the
        complete key length.  Now the key length is computed correctly (I hope) :-)
        
        MyISAM would reject a table with the maximum number of keys and the maximum
        number of key segments in all keys.  It would allow one less than this total
        maximum.  Now MyISAM accepts a table defined with the maximum.  (This is a
        very minor issue.)
      
      
      myisam/mi_open.c:
        Bug #26642: change >= to > in a comparison (i.e., error 
        only if key_parts_in_table really is greater than 
        MAX_KEY * MAX_KEY_SEG)
      mysql-test/r/create.result:
        Bug #26642: test case
      mysql-test/t/create.test:
        Bug #26642: test case
      sql/table.cc:
        Bug #26642: In create_frm(), fix formula for key_length; 
        it was too small by (keys * 2) bytes
      0c31d0bb
    • unknown's avatar
      Bug #29156 events crash server in test suite · 9ee3b4b7
      unknown authored
      don't free thd->lex->sphead if we didn't do lex_start(),
      as we can have garbage there
      
      
      mysql-test/r/events_bugs.result:
        Bug #29156 events crash server in test suite
        
        test result added
      mysql-test/t/events_bugs.test:
        Bug #29156 events crash server in test suite
        
        testcase
      9ee3b4b7
    • unknown's avatar
      rpl_partition.test fixed · f454990c
      unknown authored
      
      mysql-test/r/rpl_partition.result:
        result fixed
      mysql-test/t/rpl_partition.test:
        machine-depending lines hidden in result
      f454990c
  6. 26 Jun, 2007 7 commits
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 39ef7a53
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29087
      
      
      39ef7a53
    • unknown's avatar
      Fixed bug #29251. · 7fbf6303
      unknown authored
      Sometimes special 0 ENUM values was ALTERed to normal
      empty string ENUM values.
      
      Special 0 ENUM value has the same string representation
      as normal ENUM value defined as '' (empty string).
      The do_field_string function was used to convert
      ENUM data at an ALTER TABLE request, but this
      function doesn't care about numerical "indices" of
      ENUM values, i.e. do_field_string doesn't distinguish
      a special 0 value from an empty string value.
      
      A new copy function called do_field_enum has been added to
      copy special 0 ENUM values without conversion to an empty
      string.
      
      
      sql/field_conv.cc:
        Fixed bug #29251.
        The Copy_field::get_copy_func method has been modified to
        return a pointer to the do_field_enum function if a conversion
        between two columns of incompatible enum types is required.
        The do_field_enum function has been added for the correct
        conversion of special 0 enum values.
      mysql-test/t/type_enum.test:
        Updated test case for bug #29251.
      mysql-test/r/type_enum.result:
        Updated test case for bug #29251.
      7fbf6303
    • unknown's avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · e2af383d
      unknown authored
      into  mysql.com:/home/hf/work/28430/my51-28430
      
      
      e2af383d
    • unknown's avatar
      Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. · f01095d1
      unknown authored
      In the ha_partition::position we don't calculate the number of
      the partition of the record. We use m_last_part_value instead relying on
      that it is set in other place like previous calls of ::write_row().
      In replication we do neither of these calls before ::position().
      Delete_row_log_event::do_exec_row calls find_and_fetch_row() where
      we used position() & rnd_pos() calls to find the record for the
      PARTITION/INNODB table as it posesses InnoDB table flags.
      Fixed by removing HA_PRIMARY_KEY_REQUIRED_FOR_POSITION flag from PARTITION
      
      
      sql/ha_partition.cc:
        Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
        
        add HA_PRIMARY_KEY_REQUIRED_FOR_POSITION flag added to PRTITION engine
      mysql-test/r/rpl_partition.result:
        New BitKeeper file ``mysql-test/r/rpl_partition.result''
      mysql-test/t/rpl_partition.test:
        New BitKeeper file ``mysql-test/t/rpl_partition.test''
      f01095d1
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 69f82e25
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B29154-5.0-opt
      
      
      69f82e25
    • unknown's avatar
      Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · b535307c
      unknown authored
      into  dl145s.mysql.com:/dev/shm/mhansson/my51-bug28677
      
      
      b535307c
    • unknown's avatar
      Fixed bug #29087. This bug manifested itself for queries that performed · 0127c1a3
      unknown authored
      a lookup into a BINARY index by a key ended with spaces. It caused
      an assertion abort for a debug version and wrong results for non-debug
      versions.
      
      The problem occurred because the function _mi_pack_key stripped off 
      the trailing spaces from binary search keys while the function _mi_make_key
      did not do it when keys were inserted into the index.
      
      Now the function _mi_pack_key does not remove the trailing spaces from
      search keys if they are of the binary type.
      
      
      mysql-test/r/binary.result:
        Added a test case for bug #29087.
      mysql-test/t/binary.test:
        Added a test case for bug #29087.
      0127c1a3
  7. 25 Jun, 2007 10 commits
    • unknown's avatar
      Bug #26564: Windows implementation of pthread_join crashes · 76295d4b
      unknown authored
      MySQL uses _beginthread()/_endthread() instead of 
      _beginthreadex()/_endthreadex() to create/end its threads
      on Windows.
      According to MSDN  _endthread() does close the thread handle.
      So there's no need the handle to be closed explicitly.
      Besides : WaitForSingleObject(, INFINITE) != WAIT_OBJECT_0) is
      true for all practical cases as the other two possible return 
      codes (according to MSDN) cannot happen in that case the 
      CloseHandle() was actually a dead code.
      Fixed by removing the CloseHandle() call. No test case added
      because it's not possible to test for absence of dead code. 
      
      
      include/my_pthread.h:
        Bug #26564: Don't call CloseHandle since we use 
        beginthread/endthread instead of beginthreadex/endthreadex.
      76295d4b
    • unknown's avatar
      Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · a0fa27cf
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      a0fa27cf
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.1 · eb3c6257
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      eb3c6257
    • unknown's avatar
      Raise version number after cloning 5.1.20-beta · 36151ca3
      unknown authored
      36151ca3
    • unknown's avatar
      Bug #29247 Double free in libmysqlclient_r when mysql restarted. · 57444944
      unknown authored
      If one sets MYSQL_READ_DEFAULTS_FILE and MYSQL_READ_DEFAULT_GROUP options
      after mysql_real_connect() called with that MYSQL instance,
      these options will affect next mysql_reconnect then.
      As we use a copy of the original MYSQL object inside mysql_reconnect,
      and mysql_real_connect frees options.my_cnf_file and _group strings,
      we will free these twice when we execute mysql_reconnect with the
      same MYSQL for the second time.
      
      I don't think we should ever read defaults files handling mysql_reconnect.
      So i just set them to 0 for the temporary MYSQL object there/
      
      
      sql-common/client.c:
        Bug #29247 Double free in libmysqlclient_r when mysql restarted.
        
        we don't need mysql_real_connect to reread defaults file in this
        case, so set related parameters to zero
      57444944
    • unknown's avatar
      Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · 25f08443
      unknown authored
      into  dl145s.mysql.com:/dev/shm/mhansson/my51-bug28677
      
      
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      25f08443
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · 7a310d32
      unknown authored
      into  mysql.com:/home/hf/work/27084/my51-27084
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/sql_partition.h:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/partition.result:
        merging
      mysql-test/t/partition.test:
        merging
      sql/sql_partition.cc:
        SCCS merged
      7a310d32
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt · 475a08a2
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      475a08a2
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/4.1-opt · 637d9f1c
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      637d9f1c
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0 · fb12c686
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      fb12c686