1. 26 Feb, 2008 4 commits
  2. 25 Feb, 2008 1 commit
    • unknown's avatar
      Bug#28386 the general log is incomplete · b2e879cb
      unknown authored
      The problem is that the commands COM_STMT_CLOSE, COM_STMT_RESET,
      COM_STMT_SEND_LONG_DATA weren't being logged to the general log.
      
      The solution is to log the general log the aforementioned commands.
      
      
      mysql-test/t/mysql_client_test-master.opt:
        Also log to table.
      sql/sql_prepare.cc:
        Log COM_STMT_CLOSE, COM_STMT_RESET and COM_STMT_SEND_LONG_DATA.
      tests/mysql_client_test.c:
        Add test case for Bug#28386
      b2e879cb
  3. 22 Feb, 2008 15 commits
    • unknown's avatar
      Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 98e7d709
      unknown authored
      into  whirlpool.hristov.com:/work/mysql-5.1-runtime
      
      
      98e7d709
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · e70944d4
      unknown authored
      into  dipika.(none):/opt/local/work/mysql-5.1-runtime
      
      
      e70944d4
    • unknown's avatar
      Update new test results after merge (Bug#12713) · d6989496
      unknown authored
      d6989496
    • unknown's avatar
      Fix for Bug#29605 · 233143fd
      unknown authored
      --local-infile=0 checks can be bypassed by sending a FETCH LOCAL FILE response
        
      Add a check for CLIENT_LOCAL_FILES before sending a local file.
      Beware, that all binary distributions enable sending of local files and it's up
      to the programs which use libmysql to disable it, if they don't use this functionality.
      Otherwise they are not safe.
      
      
      client/mysqltest.c:
        Enable LOAD DATA LOCAL INFILE for the test suite, like some rpl and ndb test.
      sql-common/client.c:
        Check if the client has LOAD DATA LOCAL INFILE disabled and
        don't serve such requests from the server. This is not 100% proof,
        as if the client has this enabled, in all binary builds for BC,
        the check won't work and the client can be tricked into sending a
        local file.
      tests/mysql_client_test.c:
        Switch on LOCAL INFILE in client test. If one day there
        is a test which uses it, then it will work out of the box.
      233143fd
    • unknown's avatar
      Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 0dedada2
      unknown authored
      into  whirlpool.hristov.com:/work/mysql-5.1-runtime
      
      
      sql/events.cc:
        Auto merged
      0dedada2
    • unknown's avatar
      Fix for bug#22738 Events: After stop and start disabled events could reside in the queue · 5d6ca9c2
      unknown authored
      Disabled events weren't removed from the memory queue after the scheduler has been
      re-enabled. After recalculation of next execution time of an event, it might get disabled.
      
      
      sql/event_queue.cc:
        Sort the event queue in a way that the disabled events will always be
        at the end. We will use this for cleaning it, starting from the end.
        
        After recalculating times in the queue, after the scheduler has been enabled
        after disabled state, the queue should be cleaned from DISABLED events.
        The queue is sorted in a way such that the disabled events are at the end.
        Thus, we can start from the end of the queue and remove all DISABLED till we
        find the first with different state.
      sql/events.cc:
        Add a comment about possible problem with replication of events,
        disabled events and server restarts.
      5d6ca9c2
    • unknown's avatar
      Update new tests after merge. · 5990242f
      unknown authored
      5990242f
    • unknown's avatar
      An unused variable (compile-time warning). · 5d26f63c
      unknown authored
      
      sql/sql_view.cc:
        An unused variable.
      5d26f63c
    • unknown's avatar
      Disable concurrent inserts for the kill.test · c9be87d0
      unknown authored
      
      mysql-test/r/kill.result:
        Update test case result.
      mysql-test/t/disabled.def:
        Re-enable kill test, bug was closed.
      mysql-test/t/kill.test:
        Disable concurrent inserts for the kill test.
      c9be87d0
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 6f044970
      unknown authored
      into  buzz.(none):/home/davi/mysql-5.1-runtime
      
      
      6f044970
    • unknown's avatar
      Fix lock_multi test case failure related to · c3801d96
      unknown authored
      concurrent inserts.
      
      
      mysql-test/t/lock_multi.test:
        Wait for the concurrent insert to finish.
      c3801d96
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 00ff33cf
      unknown authored
      into  quad.:/mnt/raid/alik/MySQL/devel/bug-30217/5.1-rt-bug30217
      
      
      sql/item.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      00ff33cf
    • unknown's avatar
      Fix for Bug#30217: Views: changes in metadata behaviour · a3e83048
      unknown authored
      between 5.0 and 5.1.
        
      The problem was that in the patch for Bug#11986 it was decided
      to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
      This approach however turned out to be quite difficult to implement
      properly. The main problem is to preserve the same IS-output after
      dump/restore.
        
      So, the fix is to rollback to the previous functionality, but also
      to fix it to support multi-character-set-queries properly. The idea
      is to generate INFORMATION_SCHEMA-query from the item-tree after
      parsing view declaration. The IS-query should:
        - be completely in UTF8;
        - not contain character set introducers.
        
      For more information, see WL4052.
      
      
      mysql-test/include/ddl_i18n.check_views.inc:
        Add a test case for Bug#30217.
      mysql-test/r/ddl_i18n_koi8r.result:
        Update result file.
      mysql-test/r/ddl_i18n_utf8.result:
        Update result file.
      mysql-test/r/information_schema.result:
        Update result file.
      mysql-test/r/information_schema_db.result:
        Update result file.
      mysql-test/r/mysqldump.result:
        Update result file.
      mysql-test/r/show_check.result:
        Update result file.
      mysql-test/t/ddl_i18n_koi8r.test:
        Add a test case for Bug#30217.
      mysql-test/t/ddl_i18n_utf8.test:
        Add a test case for Bug#30217.
      mysql-test/t/mysqldump.test:
        Add a test case for Bug#30217.
      sql/ha_ndbcluster.cc:
        Add a parameter to print().
      sql/item.cc:
        1. Add a parameter to print().
        2. Item_string::print():
              - Do not append character set introducer to the text literal
                if we're building a query for INFORMATION_SCHEMA;
              - Convert text literal to UTF8 if we're building a query
                for INFORMATION_SCHEMA.
      sql/item.h:
        Add a parameter to print().
      sql/item_cmpfunc.cc:
        Add a parameter to print().
      sql/item_cmpfunc.h:
        Add a parameter to print().
      sql/item_func.cc:
        Add a parameter to print().
      sql/item_func.h:
        Add a parameter to print().
      sql/item_geofunc.h:
        Add a parameter to print().
      sql/item_row.cc:
        Add a parameter to print().
      sql/item_row.h:
        Add a parameter to print().
      sql/item_strfunc.cc:
        Add a parameter to print().
      sql/item_strfunc.h:
        Add a parameter to print().
      sql/item_subselect.cc:
        Add a parameter to print().
      sql/item_subselect.h:
        Add a parameter to print().
      sql/item_sum.cc:
        Add a parameter to print().
      sql/item_sum.h:
        Add a parameter to print().
      sql/item_timefunc.cc:
        Add a parameter to print().
      sql/item_timefunc.h:
        Add a parameter to print().
      sql/mysql_priv.h:
        Add a parameter to print().
      sql/sp_head.cc:
        Add a parameter to print().
      sql/sql_lex.cc:
        Add a parameter to print().
      sql/sql_lex.h:
        Add a parameter to print().
      sql/sql_parse.cc:
        Add a parameter to print().
      sql/sql_select.cc:
        Add a parameter to print().
      sql/sql_show.cc:
        Add a parameter to print().
      sql/sql_test.cc:
        Add a parameter to print().
      sql/sql_view.cc:
        Build INFORMATION_SCHEMA query from Item-tree.
      sql/sql_yacc.yy:
        Build INFORMATION_SCHEMA query from Item-tree.
      sql/table.h:
        Add a parameter to print().
      a3e83048
    • unknown's avatar
      Post-merge fixes for bug 32890 · 3676f518
      unknown authored
      
      mysql-test/r/ps.result:
        Update test case results
      sql/item.h:
        Manual merge
      sql/sql_view.cc:
        Manual merge
      3676f518
    • unknown's avatar
      Merge buzz.(none):/home/davi/mysql-5.0-runtime · 955b3e3d
      unknown authored
      into  buzz.(none):/home/davi/mysql-5.1-runtime
      
      
      mysql-test/r/ps.result:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      sql/sql_view.h:
        Auto merged
      sql/item.h:
        Manual merge
      sql/sql_prepare.cc:
        Manual merge
      sql/sql_view.cc:
        Manual merge
      955b3e3d
  4. 21 Feb, 2008 9 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
      Fix for Bug#33065: Mysql not writing general query logs after · d8c8fd5b
      unknown authored
      sending SIGHUP.
      
      There were two problems:
        - after some recent fix, the server started to crash after
          receiving SIGHUP. That happened because LEX of new THD-object
          was not properly initialized.
        - user-specified log options were ignored when logs were reopened.
      
      The fix is to 1) initialize LEX and 2) take user-specified options
      into account.
      
      There is no test case in this CS, because our test suite does not
      support sending SIGHUP to the server.
      
      
      sql/mysqld.cc:
        Use proper logging after SIGHUP.
      sql/sql_parse.cc:
        Initialize LEX of new THD -- it is required to avoid crash
        in SIGHUP handling.
      d8c8fd5b
    • unknown's avatar
      Fix merge (fix result file) · ffd88cb2
      unknown authored
      ffd88cb2
    • unknown's avatar
      Merge quad.:/mnt/raid/alik/MySQL/devel/bug-34337/5.0-rt-bug34337 · 9bbf256c
      unknown authored
      into  quad.:/mnt/raid/alik/MySQL/devel/bug-34337/5.1-rt-bug34337
      
      
      mysql-test/r/view_grant.result:
        Auto merged
      mysql-test/t/view_grant.test:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      mysql-test/t/view.test:
        Manually merged.
      9bbf256c
    • 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
      Post-merge fixes for bugs 34587 and 32265. · 88421ee5
      unknown authored
      
      mysql-test/r/view.result:
        Drop created view.
      mysql-test/t/view.test:
        Update test result.
      sql/sql_cursor.cc:
        Fix compilation failure.
      tests/mysql_client_test.c:
        Manual merge.
      88421ee5
    • unknown's avatar
      Merge buzz.(none):/home/davi/mysql-5.0-runtime · 96b4648b
      unknown authored
      into  buzz.(none):/home/davi/mysql-5.1-runtime
      
      
      sql/sql_cursor.cc:
        Auto merged
      tests/mysql_client_test.c:
        SCCS merged
      96b4648b
    • 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
  5. 20 Feb, 2008 5 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 25ac83c0
      unknown authored
      into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
      
      
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      25ac83c0
    • unknown's avatar
      Merge mysql.com:/Users/davi/mysql/bugs/34587-5.1 · 43717ba1
      unknown authored
      into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
      
      
      sql/sql_view.cc:
        Auto merged
      43717ba1
    • unknown's avatar
      Bug#34587 Creating a view inside a stored procedure leads to a server crash · 7114fbb9
      unknown authored
      The problem is that when a stored procedure is being parsed for
      the first execution, the body is copied to a temporary buffer
      which is disregarded sometime after the statement is parsed.
      And during this parsing phase, the rule for CREATE VIEW was
      holding a reference to the string being parsed for use during
      the execution of the CREATE VIEW statement, leading to invalid
      memory access later.
      
      The solution is to allocate and copy the SELECT of a CREATE
      VIEW statement using the thread memory root, which is set to
      the permanent arena of the stored procedure. 
      
      
      mysql-test/r/view.result:
        Add test case result for Bug#34587
      mysql-test/t/view.test:
        Add test case for Bug#34587
      sql/sql_lex.h:
        Remove start and end position variables. The SELECT of a
        CREATE VIEW is now allocated at parse time.
      sql/sql_view.cc:
        Remove assertion that is not true when the statement is
        being re-executed. Use string that was trimmed of leading
        and trailing whitespace at parse time.
      sql/sql_yacc.yy:
        Allocate the SELECT of a CREATE VIEW using the current thread
        memory root and remove any leading and trailing whitespace.
      7114fbb9
    • 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
    • unknown's avatar
      Fix for Bug#34337: Server crash when Altering a view using · 985e9523
      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.
      
      
      mysql-test/r/view.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.
      sql/sql_view.cc:
        Report an error if we're going to work with a table.
      985e9523
  6. 19 Feb, 2008 6 commits