1. 24 Feb, 2007 3 commits
    • unknown's avatar
      Fix for BUG#22511: IM does not remove angel-pid-file on clean shutdown · 8251e016
      unknown authored
      
      server-tools/instance-manager/mysqlmanager.cc:
        Delete IM-angel pid file on exit.
      8251e016
    • unknown's avatar
      IM test suite fix. · f44759c7
      unknown authored
      Log messages from shell-scripts were put to var/log/<test id>.log
      file. Now, this file is used by mysql-test-run.pl. So, move log
      messages to var/log/<test id>.script.log.
      
      
      mysql-test/t/kill_n_check.sh:
        Log messages from shell-scripts were put to var/log/<test id>.log
        file. Now, this file is used by mysql-test-run.pl. So, move log
        messages to var/log/<test id>.script.log.
      mysql-test/t/log.sh:
        Log messages from shell-scripts were put to var/log/<test id>.log
        file. Now, this file is used by mysql-test-run.pl. So, move log
        messages to var/log/<test id>.script.log.
      mysql-test/t/wait_for_process.sh:
        Log messages from shell-scripts were put to var/log/<test id>.log
        file. Now, this file is used by mysql-test-run.pl. So, move log
        messages to var/log/<test id>.script.log.
      mysql-test/t/wait_for_socket.sh:
        Log messages from shell-scripts were put to var/log/<test id>.log
        file. Now, this file is used by mysql-test-run.pl. So, move log
        messages to var/log/<test id>.script.log.
      f44759c7
    • unknown's avatar
      94d4f324
  2. 23 Feb, 2007 4 commits
    • unknown's avatar
      Fix mysql-test-run.pl: IM in 5.0 uses old incorrect · 37a5703b
      unknown authored
      'shutdown_delay' option name.
      
      
      mysql-test/mysql-test-run.pl:
        IM in 5.0 uses old incorrect 'shutdown_delay' option name.
      37a5703b
    • unknown's avatar
      Fix result file. · 17fca8e3
      unknown authored
      17fca8e3
    • unknown's avatar
      Fix test for views with national characters, · 49b66418
      unknown authored
      which accidentally got broken during the merge
      on 16-Feb-2007.
      
      
      mysql-test/r/view.result:
        Updated result file.
      mysql-test/t/view.test:
        Fix test for views with national characters,
        which accidentally got broken during the merge
        on 16-Feb-2007.
        
        Now view.test is in UTF8 character set,
        so SET NAMES is required.
      49b66418
    • unknown's avatar
      BUG#24415: im_daemon_life_cycle.imtest fails · df1104ff
      unknown authored
      Fix timeouts. Only test suite is changed.
      
      
      mysql-test/mysql-test-run.pl:
        Decrease MySQL server shutdown delay.
        Trasactional storage engines are not used here,
        so it should be enough.
      mysql-test/t/im_daemon_life_cycle.imtest:
        Increase wait-timeout.
      df1104ff
  3. 20 Feb, 2007 1 commit
    • unknown's avatar
      Fix for BUG#24415: Instance manager test im_daemon_life_cycle fails randomly. · 4bb9efa6
      unknown authored
      The cause of im_daemon_life_cycle.imtest random failures was the following
      behaviour of some implementations of LINUX threads: let's suppose that a
      process has several threads (in LINUX threads, there is a separate process for
      each thread). When the main process gets killed, the parent receives SIGCHLD
      before all threads (child processes) die. In other words, the parent receives
      SIGCHLD, when its child is not completely dead.
      
      In terms of IM, that means that IM-angel receives SIGCHLD when IM-main is not dead
      and still holds some resources. After receiving SIGCHLD, IM-angel restarts
      IM-main, but IM-main failed to initialize, because previous instance (copy) of
      IM-main still holds server socket (TCP-port).
      
      Another problem here was that IM-angel restarted IM-main only if it was killed
      by signal. If it exited with error, IM-angel thought it's intended / graceful
      shutdown and exited itself.
      
      So, when the second instance of IM-main failed to initialize, IM-angel thought
      it's intended shutdown and quit.
      
      The fix is
        1. to change IM-angel so that it restarts IM-main if it exited with error code;
        2. to change IM-main so that it returns proper exit code in case of failure.
      
      
      mysql-test/t/disabled.def:
        Enable im_daemon_life_cycle.
      server-tools/instance-manager/listener.cc:
        Set error status if Listener failed to initialize.
      server-tools/instance-manager/manager.cc:
        Return exit code from the manager.
      server-tools/instance-manager/manager.h:
        Return exit code from the manager.
      server-tools/instance-manager/mysqlmanager.cc:
        1. Restart IM-main if exit code is not EXIT_SUCCESS (0).
        2. Log IM-main exit code in case of failure.
      server-tools/instance-manager/thread_registry.cc:
        Add support for exit code.
      server-tools/instance-manager/thread_registry.h:
        Add support for exit code.
      4bb9efa6
  4. 19 Feb, 2007 4 commits
    • unknown's avatar
      Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my50-bug23240 · a3be5294
      unknown authored
      into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-runtime
      
      
      sql/sql_parse.cc:
        Auto merged
      a3be5294
    • unknown's avatar
      Bug#23240 --init_file statements with NOW() reports '1970-01-01 11:00:00'as the date time · a4827679
      unknown authored
      - Starting time of a query sent by bootstrapping wasn't initialized
        and starting time defaulted to 0. This later used value by NOW-
        item and was translated to 1970-01-01 11:00:00.
      - Marketing the time with thd->set_time() before the call to
        mysql_parse resolves this issue.
      - set_time was refactored to be part of the thd->init_for_queries-
        process.
      
      
      mysql-test/r/init_file.result:
        Manual merge from 4.1
      mysql-test/std_data/init_file.dat:
        Manual merge from 4.1
      sql/sql_class.cc:
        - Moved set_time into init_for_queries process.
      a4827679
    • unknown's avatar
      Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my41-bug23240 · 663b9cad
      unknown authored
      into  kpdesk.mysql.com:/home/thek/dev/bug23240/my50-bug23240
      
      
      mysql-test/t/init_file.test:
        Auto merged
      BitKeeper/deleted/.del-init_file.result:
        Auto merged
      mysql-test/std_data/init_file.dat:
        Null merge
      sql/sql_parse.cc:
        Null merge
      663b9cad
    • unknown's avatar
      Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time · 114e5b8d
      unknown authored
      - Starting time of a query sent by file bootstrapping wasn't initialized
        and starting time defaulted to 0. This later used value by the Now-
        item and is translated to 1970-01-01 11:00:00.
      - marking the time with thd->set_time() before the call to 
        mysql_parse resolves this issue.
      
      
      mysql-test/r/init_file.result:
        Appended test case
      mysql-test/std_data/init_file.dat:
        Appended test case
      mysql-test/t/init_file.test:
        Appended test case
      114e5b8d
  5. 16 Feb, 2007 2 commits
    • unknown's avatar
      Manual merge · 4386278e
      unknown authored
      4386278e
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base · a858d8e8
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_subselect.h:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      a858d8e8
  6. 14 Feb, 2007 1 commit
  7. 13 Feb, 2007 7 commits
    • unknown's avatar
      Post-merge fix · c039eed8
      unknown authored
      c039eed8
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.0 · 579c926d
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
      
      
      BitKeeper/etc/gone:
        auto-union
      mysys/my_getopt.c:
        Auto merged
      sql/field.h:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/select.result:
        Manual merge
      mysql-test/t/select.test:
        Manual merge
      579c926d
    • unknown's avatar
      Bug#25807: LOAD DATA INFILE does not work with Pipes · 035062b2
      unknown authored
      Showstopper and regression against 5.0.24.
      
      Previously, we ignored seek() errors (see Bug#22828) and let seek()s
      against pipes fail.  Now, since we check that a seek didn't fail,
      and return without reading, this bug popped up.
      
      This restores the behavior for file-ish objects that could never be 
      seek()ed.
      
      
      mysys/mf_iocache.c:
        If we detect early that the file is not tell()able, then we should
        assume that it's also not seek()able and therefore we should never
        set the (poorly named) "seek_not_done" flag so that we don't immedi-
        ately try to seek() when reading later.
        
        The problem was that tell() was returning -1, so when we read later, 
        we needlessly tried to seek to position  (unsigned long) -1 . 
        
        Also, if we think we're supposed to seek to a position in a file and 
        the file is un-tell()able, then abort.
      035062b2
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint · 6f628013
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
      
      
      sql/mysql_priv.h:
        Auto merged
      6f628013
    • unknown's avatar
      Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0 · e5c1656e
      unknown authored
      into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
      
      
      BitKeeper/etc/ignore:
        auto-union
      e5c1656e
    • unknown's avatar
      Merge pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint · faacf580
      unknown authored
      into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
      
      
      BitKeeper/etc/gone:
        auto-union
      mysys/my_getopt.c:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      faacf580
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · e656c582
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26209
      
      
      sql/sql_select.cc:
        Auto merged
      e656c582
  8. 12 Feb, 2007 17 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/20691/my50-20691 · 4c2bc81a
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      sql/item.cc:
        Auto merged
      4c2bc81a
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · e7e25506
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      e7e25506
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my41-25492 · 04b64f00
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      libmysqld/lib_sql.cc:
        merging
      04b64f00
    • unknown's avatar
      Bug#24532 (The return data type of IS TRUE is different from similar · a475ed7c
      unknown authored
        operations)
      
      Before this change, the boolean predicates:
      - X IS TRUE,
      - X IS NOT TRUE,
      - X IS FALSE,
      - X IS NOT FALSE
      were implemented by expanding the Item tree in the parser, by using a
      construct like:
      Item_func_if(Item_func_ifnull(X, <value>), <value>, <value>)
      
      Each <value> was a constant integer, either 0 or 1.
      
      A bug in the implementation of the function IF(a, b, c), in
      Item_func_if::fix_length_and_dec(), would cause the following :
      
      When the arguments b and c are both unsigned, the result type of the
      function was signed, instead of unsigned.
      
      When the result of the if function is signed, space for the sign could be
      counted twice (in the max() expression for a signed argument, and in the
      total), causing the member max_length to be too high.
      
      An effect of this is that the final type of IF(x, int(1), int(1)) would be
      int(2) instead of int(1).
      
      With this fix, the problems found in Item_func_if::fix_length_and_dec()
      have been fixed.
      
      While it's semantically correct to represent 'X IS TRUE' with
      Item_func_if(Item_func_ifnull(X, <value>), <value>, <value>),
      there are however more problems with this construct.
      
      a)
      Building the parse tree involves :
      - creating 5 Item instances (3 ints, 1 ifnull, 1 if),
      - creating each Item calls my_pthread_getspecific_ptr() once in the operator
        new(size), and a second time in the Item::Item() constructor, resulting
        in a total of 10 calls to get the current thread.
      Evaluating the expression involves evaluating up to 4 nodes at runtime.
      This representation could be greatly simplified and improved.
      
      b)
      Transforming the parse tree internally with if(ifnull(...)) is fine as long
      as this transformation is internal to the server implementation.
      With views however, the result of the parse tree is later exposed by the
      ::print() functions, and stored as part of the view definition.
      Doing this has long term consequences:
      
      1)
      The original semantic 'X IS TRUE' is lost, and replaced by the
      if(ifnull(...)) expression. As a result, SHOW CREATE VIEW does not restore
      the original code.
      
      2)
      Should a future version of MySQL implement the SQL BOOLEAN data type for
      example, views created today using 'X IS NULL' can be exported using
      mysqldump, and imported again. Such views would be converted correctly and
      automatically to use a BOOLEAN column in the future version.
      With 'X IS TRUE' and the current implementations, views using these
      "boolean" predicates would not be converted during the export/import, and
      would use integer columns instead.
      The difference traces back to how SHOW CREATE VIEW preserves 'X IS NULL' but
      does not preserve the 'X IS TRUE' semantic.
      
      With this fix, internal representation of 'X IS TRUE' booleans predicates
      has changed, so that:
      - dedicated Item classes are created for each predicate,
      - only 1 Item is created to represent 1 predicate
      - my_pthread_getspecific_ptr() is invoked 1 time instead of 10
      - SHOW CREATE VIEW preserves the original semantic, and prints 'X IS TRUE'.
      
      Note that, because of the fix in Item_func_if, views created before this fix
      will:
      - correctly use a int(1) type instead of int(2) for boolean predicates,
      - incorrectly print the if(ifnull(...), ...) expression in SHOW CREATE VIEW,
      since the original semantic (X IS TRUE) has been lost.
      - except for the syntax used in SHOW CREATE VIEW, these views will operate
      properly, no action is needed.
      
      Views created after this fix will operate correctly, and will preserve the
      original code semantic in SHOW CREATE VIEW.
      
      
      mysql-test/r/func_if.result:
        IF(x, unsigned, unsigned) should be unsigned.
      mysql-test/r/view.result:
        Preserve the semantic of 'X IS [NOT] (TRUE|FALSE)' boolean predicates.
      mysql-test/t/func_if.test:
        IF(x, unsigned, unsigned) should be unsigned.
      mysql-test/t/view.test:
        Preserve the semantic of 'X IS [NOT] (TRUE|FALSE)' boolean predicates.
      sql/item_cmpfunc.cc:
        Preserve the semantic of 'X IS [NOT] (TRUE|FALSE)' boolean predicates.
        IF(x, unsigned, unsigned) should be unsigned.
      sql/item_cmpfunc.h:
        Preserve the semantic of 'X IS [NOT] (TRUE|FALSE)' boolean predicates.
      sql/sql_yacc.yy:
        Preserve the semantic of 'X IS [NOT] (TRUE|FALSE)' boolean predicates.
      a475ed7c
    • unknown's avatar
      bug #25492 (Invalid deallocation in mysql_stmt_fetch) · fd76e148
      unknown authored
      
      libmysqld/lib_sql.cc:
        code modified to prevent freeing of memory that wasn't malloc-ed.
        Now we check if MYSQL_STMT::result was used.
      fd76e148
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0 · dfe66b93
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      dfe66b93
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 5e84eb56
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      5e84eb56
    • unknown's avatar
      valgrind error fix · 7ca34a79
      unknown authored
      7ca34a79
    • unknown's avatar
      Fixed MacOSX/Intel linking problem · e307a46c
      unknown authored
       Common symbols with and without initialization
       cause the apple linker to exclude then from the
       list of global symbols.
      
      
      e307a46c
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint · 1c285489
      unknown authored
      into  mysql.com:/home/tnurnberg/24660/50-24660
      
      
      sql/table.cc:
        Auto merged
      sql/unireg.cc:
        Auto merged
      1c285489
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · 8a34c4bb
      unknown authored
      into  mysql.com:/home/tnurnberg/24660/41-24660
      
      
      sql/table.cc:
        Auto merged
      8a34c4bb
    • unknown's avatar
      Merge mysql.com:/home/tnurnberg/24660/41-24660 · 91f684a5
      unknown authored
      into  mysql.com:/home/tnurnberg/24660/50-24660
      
      
      mysql-test/r/type_enum.result:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/unireg.cc:
        Auto merged
      91f684a5
    • unknown's avatar
      Bug#24660: "enum" field type definition problem · 4dc7c1aa
      unknown authored
      ENUMs weren't allowed to have character 0xff, a perfectly good character in some locales.
      This was circumvented by mapping 0xff in ENUMs to ',', thereby prevent actual commas from
      being used. Now if 0xff makes an appearance, we find a character not used in the enum and
      use that as a separator. If no such character exists, we throw an error.
      
      Any solution would have broken some sort of existing behaviour. This solution should
      serve both fractions (those with 0xff and those with ',' in their enums), but
      WILL REQUIRE A DUMP/RESTORE CYCLE FROM THOSE WITH 0xff IN THEIR ENUMS. :-/
      That is, mysqldump with their current server, and restore when upgrading to one with
      this patch.
      
      
      mysql-test/r/type_enum.result:
        Bug#24660: "enum" field type definition problem
        
        Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
        char in some locales), or ',', or both.
      mysql-test/t/type_enum.test:
        Bug#24660: "enum" field type definition problem
        
        Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
        char in some locales), or ',', or both.
      sql/table.cc:
        Bug#24660: "enum" field type definition problem
        
        Revert fix for Bug#20922.
      sql/unireg.cc:
        Bug#24660: "enum" field type definition problem
        
        Use a field-separator for ENUM-values that is not part of those values. If impossible,
        throw error.
      4dc7c1aa
    • unknown's avatar
      Bug#24630 Subselect query crashes mysqld · 2572c826
      unknown authored
      The crash happens because second filling of the same I_S table happens in
      case of subselect with order by. table->sort.io_cache previously allocated
      in create_sort_index() is deleted during second filling
      (function get_schema_tables_result). There are two places where
      I_S table can be filled: JOIN::exec and create_sort_index().
      To fix the bug we should check if the table was already filled
      in one of these places and skip processing of the table in second.
      
      
      mysql-test/r/information_schema.result:
        test case
      mysql-test/t/information_schema.test:
        test case
      sql/mysql_priv.h:
        added new parameter 'executed_place' to function get_schema_tables_result()
      sql/sql_select.cc:
        added new parameter 'executed_place' to function get_schema_tables_result()
      sql/sql_show.cc:
        added more accurate check for cases when we need to refresh I_S table
      sql/table.cc:
        added more accurate check for cases when we need to refresh I_S table
      sql/table.h:
        added more accurate check for cases when we need to refresh I_S table
      2572c826
    • unknown's avatar
      bug #20691 (INSERT (DEFAULT) may insert garbage with NO DEFAULT NOT NULL field) · 07f36668
      unknown authored
      Some fields (GEOMETRY first of all) can't be handled properly in this
      case at all. So we return an error in this case
      
      
      mysql-test/r/default.result:
        result fixed
      mysql-test/r/gis.result:
        result fixed
      mysql-test/t/default.test:
        VIEW test added
      mysql-test/t/gis.test:
        testcase added
      sql/item.cc:
        set_defaults() changed with the 'reset()'
      07f36668
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 1932ac9a
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26159
      
      
      1932ac9a
    • unknown's avatar
      Fixed bug #26209. · ac8e0293
      unknown authored
      The function make_unireg_sortorder ignored the fact that any
      view field is represented by a 'ref' object.
      This could lead to wrong results for the queries containing
      both GROUP BY and ORDER BY clauses.
      
      
      mysql-test/r/view.result:
        Added a test case for bug #26209.
      mysql-test/t/view.test:
        Added a test case for bug #26209.
      ac8e0293
  9. 11 Feb, 2007 1 commit
    • unknown's avatar
      sql_view.cc: · 5e42c0de
      unknown authored
        Post fix for bug#12122.
      information_schema.result:
        Corrected test case after fixing bug#12122.
      
      
      sql/sql_view.cc:
        Post fix for bug#12122.
      mysql-test/r/information_schema.result:
        Corrected test case after fixing bug#12122.
      5e42c0de