1. 14 Mar, 2008 3 commits
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-engines · 7e01efff
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG28248/mysql-5.0-engines
      
      
      7e01efff
    • unknown's avatar
      BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed · 196b616a
      unknown authored
      When there are no underlying tables specified for a merge table,
      SHOW CREATE TABLE outputs a statement that cannot be executed. The
      same is true for mysqldump (it generates dumps that cannot be
      executed).
      
      This happens because SQL parser does not accept empty UNION() clause.
      
      This patch changes the following:
      - it is now possible to execute CREATE/ALTER statement with
        empty UNION() clause.
      - the same as above, but still worth noting: it is now possible to
        remove underlying tables mapping using ALTER TABLE ... UNION=().
      - SHOW CREATE TABLE does not output UNION() clause if there are
        no underlying tables specified for a merge table. This makes
        mysqldump slightly smaller.
      
      
      mysql-test/r/merge.result:
        A test case for BUG#28248.
      mysql-test/t/merge.test:
        A test case for BUG#28248.
      sql/ha_myisammrg.cc:
        Do not output UNION clause in SHOW CREATE TABLE, when there are
        no underlying tables defined.
      sql/sql_yacc.yy:
        Make underlying table list for MERGE engine optional.
        
        As for MERGE engine empty underlying tables list is valid, it should
        be valid for the parser as well.
        
        This change is mostly needed to restore dumps made by earlier MySQL
        versions. Also with this fix it is possible to remove underlying
        tables mapping by using ALTER TABLE ... UNION=().
      196b616a
    • unknown's avatar
      BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if · 3ec86767
      unknown authored
                  log-slave-updates and circul repl
      
      This is a test case fix for BUG#13861.
      
      
      mysql-test/r/rpl_dual_pos_advance.result:
        Fix for a test case for BUG#13861.
      mysql-test/t/rpl_dual_pos_advance.test:
        Fix for a test case for BUG#13861.
        
        master_pos_wait() requires slave sql thread running. But it is not
        guaranteed for this test case. As we use start slave until it may
        execute all events and shutdown before master_pos_wait() is started.
        
        On the other hand it is safe just to wait for slave to stop here,
        as start slave returns _after_ sql thread is started.
      3ec86767
  2. 07 Mar, 2008 2 commits
  3. 06 Mar, 2008 2 commits
    • unknown's avatar
      additional test fixes for bug 27580 · f2c9483d
      unknown authored
      f2c9483d
    • unknown's avatar
      Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b27580 · 89fb97c5
      unknown authored
      into  mysql.com:/home/bar/mysql-work/mysql-5.0.b27580v2
      
      
      mysql-test/r/ctype_ucs.result:
        Auto merged
      mysql-test/t/ctype_ucs.test:
        Auto merged
      mysql-test/include/ctype_common.inc:
        after merge fix
      mysql-test/r/ctype_big5.result:
        after merge fix
      mysql-test/r/ctype_euckr.result:
        after merge fix
      mysql-test/r/ctype_gb2312.result:
        after merge fix
      mysql-test/r/ctype_gbk.result:
        after merge fix
      mysql-test/r/ctype_uca.result:
        after merge fix
      89fb97c5
  4. 04 Mar, 2008 1 commit
    • unknown's avatar
      Bug#23097 mysql can't insert korean on mysql prompt. · 8e4a3fcb
      unknown authored
      Problem: libedit is a very pure-ASCII oriented library,
      and it is not aware of extended (0x80..0xFF) or even multi-byte
      characters. It considered such characters as non-printable
      and didn't allow to input them.
      Fix: make libedit think that all bytes >= 0x80 are printable.
      
      
      cmd-line-utils/libedit/el.h:
        Defining macro, a locale's isprint() replacement.
        We'll consider all 8bit values as printable characters.
      cmd-line-utils/libedit/key.c:
        Changing isprint() to el_isprint().
      cmd-line-utils/libedit/map.c:
        Changing isprint() to el_isprint().
      cmd-line-utils/libedit/read.c:
        Changing isprint() to el_isprint().
      cmd-line-utils/libedit/refresh.c:
        Changing isprint() to el_isprint().
      8e4a3fcb
  5. 03 Mar, 2008 1 commit
  6. 28 Feb, 2008 2 commits
    • unknown's avatar
      Post-merge fix for Bug 33851. The initialization order of members · 8b779456
      unknown authored
      must match the order which they were declared in the class definition. 
      
      
      sql/item.cc:
        Fix initialization order, parameter was the last one declared.
      8b779456
    • unknown's avatar
      Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210 · 1164e2bc
      unknown authored
      The problem is that passing anything other than a integer to a limit
      clause in a prepared statement would fail. This limitation was introduced
      to avoid replication problems (e.g: replicating the statement with a
      string argument would cause a parse failure in the slave).
      
      The solution is to convert arguments to the limit clause to a integer
      value and use this converted value when persisting the query to the log.
      
      
      mysql-test/r/limit.result:
        Update test case result.
      mysql-test/r/ps.result:
        Add test case result for Bug#33851
      mysql-test/r/rpl_user_variables.result:
        Test case result for replication of prepared statement with
        limit clause.
      mysql-test/t/limit.test:
        Test parameters to limit clause.
      mysql-test/t/ps.test:
        Add test case for Bug#33851
      mysql-test/t/rpl_user_variables.test:
        Test replication of a parameter which value is converted.
      sql/item.cc:
        Convert value to integer if it's a parameter to a limit clause.
      sql/item.h:
        Flag signal that item is a parameter to a limit clause.
      sql/item_func.cc:
        Const member functions, object is not mutated.
      sql/sql_class.h:
        Const member functions, object is not mutated.
      sql/sql_yacc.yy:
        Flag that item is a parameter to a limit clause.
      1164e2bc
  7. 27 Feb, 2008 3 commits
  8. 26 Feb, 2008 2 commits
  9. 24 Feb, 2008 1 commit
  10. 23 Feb, 2008 1 commit
  11. 22 Feb, 2008 2 commits
    • unknown's avatar
      Merge trift2.:/MySQL/M50/mysql-5.0 · 1bee6a3c
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
        Auto merged
      1bee6a3c
    • unknown's avatar
      BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if · fea2a5d8
      unknown authored
                  log-slave-updates and circul repl
      
      Slave SQL thread may execute one extra event when there are events
      skipped by slave I/O thread (e.g. originated by the same server).
      Whereas it was requested not to do so by the UNTIL condition.
      
      This happens because we compare with the end position of previously
      executed event. This is fine when there are no skipped by slave I/O
      thread events, as end position of previous event equals to start
      position of to be executed event. Otherwise this position equals to
      start position of skipped event.
      
      This is fixed by:
      - reading the event to be executed before checking if the until condition
        is satisfied.
      - comparing the start position of the event to be executed. Since we do
        not have the start position available, we compute it by subtracting
        event length from end position (which is available).
      - if there are no events on the event queue at the slave sql starting
        time, that meet until condition, we stop immediately, as in this
        case we do not want to wait for next event.
      
      
      mysql-test/r/rpl_dual_pos_advance.result:
        A test case for BUG#13861.
      mysql-test/t/rpl_dual_pos_advance.test:
        A test case for BUG#13861.
      sql/log_event.cc:
        Store length of event. This is needed for further calculation of
        the beginning of event.
      sql/slave.cc:
        Slave SQL thread may execute one extra event when there are events
        skipped by slave I/O thread (e.g. originated by the same server).
        Whereas it was requested not to do so by the UNTIL condition.
        
        This happens because we compare with the end position of previously
        executed event. This is fine when there are no skipped by slave I/O
        thread events, as end position of previous event equals to start
        position of to be executed event. Otherwise this position equals to
        start position of skipped event.
        
        This is fixed by:
        - reading the event to be executed before checking if the until condition
          is satisfied.
        - comparing the start position of the event to be executed. Since we do
          not have the start position available, we compute it by subtracting
          event length from end position (which is available).
        - if there are no events on the event queue at the slave sql starting
          time, that meet until condition, we stop immediately, as in this
          case we do not want to wait for next event.
      sql/slave.h:
        Added master_log_pos parametr to is_until_satisfied().
      mysql-test/t/rpl_dual_pos_advance-slave.opt:
        New BitKeeper file ``mysql-test/t/rpl_dual_pos_advance-slave.opt''
      fea2a5d8
  12. 21 Feb, 2008 8 commits
    • unknown's avatar
      Post-merge fix to silence compiler warning. · 9f245df8
      unknown authored
      
      sql/sql_prepare.cc:
        Removed unused variable.
      9f245df8
    • unknown's avatar
      Bug#32890 Crash after repeated create and drop of tables and views · 315665cf
      unknown authored
      The problem is that CREATE VIEW statements inside prepared statements
      weren't being expanded during the prepare phase, which leads to objects
      not being allocated in the appropriate memory arenas.
      
      The solution is to perform the validation of CREATE VIEW statements
      during the prepare phase of a prepared statement. The validation
      during the prepare phase assures that transformations of the parsed
      tree will use the permanent arena of the prepared statement.
      
      
      mysql-test/r/ps.result:
        Add test case result for Bug#32890
      mysql-test/t/ps.test:
        Add test case for Bug#32890
      sql/item.h:
        Restore original field name if name is auto generated.
      sql/sql_prepare.cc:
        Validate and prepare a CREATE VIEW statement for execution.
      sql/sql_view.cc:
        Move privileges check to it's own function.
      sql/sql_view.h:
        Export function which check privileges of a CREATE VIEW statement.
      315665cf
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-build · ae1eaff2
      unknown authored
      into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-build
      
      
      ae1eaff2
    • unknown's avatar
      Bug#32025 ndb_waiter does too many roundtrips to ndb_mgmd · fa7707ad
      unknown authored
       - fix test failures that was already there but now are
         more consistent when the 1 second sleep has been removed from
         ndb_waiter
      
      
      mysql-test/t/ndb_autodiscover.test:
        Wait until mysqld has reconnected to ndbd after ndbd has been restarted
      mysql-test/t/ndb_autodiscover3.test:
        Wait until mysqld has reconnected to ndbd after ndbd has been restarted
      mysql-test/include/ndb_wait_connected.inc:
        Wait until mysqld has reconnected to ndbd after ndbd has been restarted
      fa7707ad
    • unknown's avatar
      Fix for Bug#34337: Server crash when Altering a view using · fa08b280
      unknown authored
      a table name.
        
      The problem was that fill_defined_view_parts() did not return
      an error if a table is going to be altered. That happened if
      the table was already in the table cache. In that case,
      open_table() returned non-NULL value (valid TABLE-instance from
      the cache).
        
      The fix is to ensure that an error is thrown even if the table
      is in the cache.
      
      (This is a backport of the original patch for 5.1)
      
      
      mysql-test/r/view.result:
        Fix result file.
      mysql-test/r/view_grant.result:
        Fix result file.
      mysql-test/t/view.test:
        Add a test case for Bug#34337: Server crash when Altering a view
        using a table name.
      mysql-test/t/view_grant.test:
        Fix order-dependency.
      sql/sql_view.cc:
        Report an error if we're going to work with a table.
      fa08b280
    • unknown's avatar
      Merge xiphis.org:/anubis/antony/work/mysql-5.0-engines · c3a5c0a0
      unknown authored
      into  xiphis.org:/anubis/antony/work/merge.20080220/mysql-5.0
      
      
      c3a5c0a0
    • unknown's avatar
      Merge vvaintroub@bk-internal.mysql.com:/home/bk/mysql-5.0-build · 54fc802a
      unknown authored
      into  wva.:C:/bk/bug31745_2/mysql-5.0-build
      
      
      sql/sql_parse.cc:
        Auto merged
      54fc802a
    • unknown's avatar
      Post-merge fix to silence a compilation warning introduced · d34f8384
      unknown authored
      by patch for bug 32265 .
      
      
      tests/mysql_client_test.c:
        Removed unused variable.
      d34f8384
  13. 20 Feb, 2008 1 commit
    • unknown's avatar
      Bug#32265 Server returns different metadata if prepared statement is used · a399fefd
      unknown authored
      Executing a prepared statement associated with a materialized
      cursor yields to the client a metadata packet with wrong table
      and database names. The problem was occurring because the server
      was sending the the name of the temporary table used by the cursor
      instead of the table name of the original table. The same problem
      occurs when selecting from views, in which case the table name was
      being sent and not the name of the view.
        
      The solution is to fill the list item from the temporary table but
      preserving the table and database names of the original fields. This
      is achieved by tweaking the Select_materialize to accept a pointer to
      the Materialized_cursor class which contains the item list to be filled.
      
      
      sql/sql_cursor.cc:
        Fill the item list in the send_fields method and preserve
        the table and database name of the fields.
      tests/mysql_client_test.c:
        Add test case for Bug#32265
      a399fefd
  14. 19 Feb, 2008 2 commits
    • unknown's avatar
      BUG#34289 - Incorrect NAME_CONST substitution in stored procedures · f802cd51
      unknown authored
                  breaks replication
      
      NAME_CONST() didn't replicate constant character set and collation
      correctly.
      
      With this fix NAME_CONST() inherits collation from the value argument.
      
      
      mysql-test/r/func_misc.result:
        A test case for BUG#34289.
      mysql-test/t/func_misc.test:
        A test case for BUG#34289.
      sql/item.cc:
        Inherit collation from value argument.
      f802cd51
    • unknown's avatar
      Bug#31745 - crash handler does not work on Windows · 721d2412
      unknown authored
      - Replace per-thread signal()'s with  SetUnhandledExceptionFilter(). 
        The only remaining signal() is for SIGABRT (default abort()
        handler in VS2005 is broken, i.e removes user exception filter)
      - remove MessageBox()'es  from error handling code
      - Windows port for print_stacktrace() and write_core() 
      - Cleanup, removed some unused functions
      
      
      sql/CMakeLists.txt:
        Implement stack tracing on and generating crash dumps on Windows
      sql/mysqld.cc:
        Correct signal handling on Windows. 
        - For console events, like CTRL-C use SetConsoleCtrlHandler
        - For exceptions like access violation, use SetUnhandledExceptionFilter
        - For SIGABRT generate exception via __debugbreak() intrinsic
          if built with VS2005 and later , since default SIGABRT handler 
          replaces unhandled exception filter specified by user
        - make provisions to debug exception filter, as it is not trivial 
        (should be compiled with /DDEBUG_UNHANDLED_EXCEPTION_FILTER)
      sql/sql_parse.cc:
        Remove message box from windows signal handler.
        The only thread specific handler left is for SIGABRT,
        which is broken on VS2005 and later (user specified unhandled exception 
        filter gets overwritten)
      sql/stacktrace.c:
        Stack tracing and generating crash dumps on Windows
      sql/stacktrace.h:
        Implement print_stacktrace and write_core on Windows
      721d2412
  15. 18 Feb, 2008 4 commits
  16. 15 Feb, 2008 2 commits
  17. 14 Feb, 2008 3 commits