1. 13 Aug, 2004 1 commit
    • unknown's avatar
      join_nested.test, join_nested.result: · 0751a68e
      unknown authored
        Added a case for bug #4976 when one of the inner tables is empty.
      select.result, join.result:
        Reversed the previous change of the erronious fix for bug #4976.
      sql_select.cc:
        The previous fix for bug 4976 was reversed as it
        erroniously converted an outer join into an innner join
        when on_expression does not refer to outer tables.
        This is not valid if inner tables return an empty set.
        Setting dependency on outer tables was added for the above cases.
        To fix the crash in the test case of bug #4976  
        a guard was added that blocks running the crashing code for
        nested outer joins.
      
      
      sql/sql_select.cc:
        The previous fix for bug 4976 was reversed as it
        erroniously converted an outer join into an innner join
        when on_expression does not refer to outer tables.
        This is not valid if inner tables return an empty set.
        Setting dependency on outer tables was added.
        The crash of the test case for bug #4976 was fixed
        adding a guard that blocks running the code for
        nested outer joins.
      mysql-test/r/join.result:
        Reversed the previous change of the erronious fix for bug #4976.
      mysql-test/r/select.result:
        Reversed the previous change of the erronious fix for bug #4976.
      mysql-test/r/join_nested.result:
        Added a case for bug #4976 when one of the inner tables is empty.
      mysql-test/t/join_nested.test:
        Added a case for bug #4976 when one of the inner tables is empty.
      0751a68e
  2. 11 Aug, 2004 2 commits
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-5.0 · 0ee657d1
      unknown authored
      into rurik.mysql.com:/home/igor/dev/mysql-5.0-1
      
      0ee657d1
    • unknown's avatar
      join.result, select.result: · 0cb85479
      unknown authored
        Fixed bug #4976.
      join_nested.result, join_nested.test:
        Added a test case for bug #4976.
      sql_select.cc:
        Applied conversion from an outer join to an inner join 
        when the on expression does not depend on the outer table.
        It fixed bug #4976.
      
      
      sql/sql_select.cc:
        Applied conversion from an outer join to an inner join 
        when the on expression does not depend on the outer table.
        It fixed bug #4976.
      mysql-test/t/join_nested.test:
        Added a case test for bug #4976.
      mysql-test/r/join_nested.result:
        Added a case test for bug #4976.
      mysql-test/r/select.result:
        Fixed bug #4976.
      mysql-test/r/join.result:
        Fixed bug #4976.
      0cb85479
  3. 10 Aug, 2004 2 commits
    • unknown's avatar
      view.result: · 4d87c483
      unknown authored
        Update test results.
      
      
      mysql-test/r/view.result:
        Update test results.
      4d87c483
    • unknown's avatar
      errmsg.txt: · 256d6eb0
      unknown authored
        fix error message
      
      
      sql/share/czech/errmsg.txt:
        fix error message
      sql/share/danish/errmsg.txt:
        fix error message
      sql/share/dutch/errmsg.txt:
        fix error message
      sql/share/english/errmsg.txt:
        fix error message
      sql/share/estonian/errmsg.txt:
        fix error message
      sql/share/french/errmsg.txt:
        fix error message
      sql/share/german/errmsg.txt:
        fix error message
      sql/share/greek/errmsg.txt:
        fix error message
      sql/share/hungarian/errmsg.txt:
        fix error message
      sql/share/italian/errmsg.txt:
        fix error message
      sql/share/japanese/errmsg.txt:
        fix error message
      sql/share/korean/errmsg.txt:
        fix error message
      sql/share/norwegian-ny/errmsg.txt:
        fix error message
      sql/share/norwegian/errmsg.txt:
        fix error message
      sql/share/polish/errmsg.txt:
        fix error message
      sql/share/portuguese/errmsg.txt:
        fix error message
      sql/share/romanian/errmsg.txt:
        fix error message
      sql/share/serbian/errmsg.txt:
        fix error message
      sql/share/slovak/errmsg.txt:
        fix error message
      sql/share/spanish/errmsg.txt:
        fix error message
      sql/share/swedish/errmsg.txt:
        fix error message
      256d6eb0
  4. 09 Aug, 2004 1 commit
    • unknown's avatar
      mysqld.cc: · 29bcf756
      unknown authored
        Typos/grammar.
      
      
      sql/mysqld.cc:
        Typos/grammar.
      29bcf756
  5. 06 Aug, 2004 6 commits
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-5.0 · c63100de
      unknown authored
      into rurik.mysql.com:/home/igor/dev/mysql-5.0-1
      
      
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      c63100de
    • unknown's avatar
      join_nested.result, join_nested.test: · 8809cf18
      unknown authored
        Added a test case for bug #4922.
      sql_select.cc:
        Blocked an optimization performed by join_read_const_table when
        applied to an inner table of a nested outer join.
        It was done to fix bug #4922.
      sql_yacc.yy:
        Fixed a typo bug in the rule for join_table.
      
      
      sql/sql_yacc.yy:
        Fixed a typo bug in the rule for join_table.
      sql/sql_select.cc:
        Blocked an optimization performed by join_read_const_table when
        applied to an inner table of a nested outer join.
        It was done to fix bug #4922.
      mysql-test/t/join_nested.test:
        Added a test case for bug #4922.
      mysql-test/r/join_nested.result:
        Added a test case for bug #4922.
      8809cf18
    • unknown's avatar
      Fixed BUG#4934: Caching issue with stored procedures. · f8e575e7
      unknown authored
        ...and added new test file, sp-threads, for multiple connection tests
        (apart from the security tests that are in sp-security).
      
      
      sql/sp.cc:
        When removing an SP, invalidate the caches even if the
        removing thread doesn't have one.
      f8e575e7
    • unknown's avatar
      Removed an SP test case that's not repeatable over different builds/platforms. · da4ad7f1
      unknown authored
      
      mysql-test/r/sp.result:
        Removed a test case that's not repeatable over different builds/platforms.
      mysql-test/t/sp.test:
        Removed a test case that's not repeatable over different builds/platforms.
      da4ad7f1
    • unknown's avatar
      Fixed BUG#4904: Stored procedure crash if continue handler for HY000 errors. · b4c9e3f4
      unknown authored
        The description is not entirerly correct. The issue was follow-up errors
        where the first error is not caught - in which case it's often a system
        error with errcode < 1000 (which are mapped by default to 'HY000'). In this
        case the error state is different from what was assumed in the execution
        loop.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#4902.
      mysql-test/t/sp.test:
        New test case for BUG#4902.
      sql/sp_head.cc:
        Don't test the net.report_error flag in the execution loop. (Don't know
        why this was done in the first place, as it seems to serve no purpose.)
      b4c9e3f4
    • unknown's avatar
      Fixed BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error, · 6901fd55
      unknown authored
        and tried to do it properly this time, digging out all show commands that
        need the multi results flag set.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#4902, with lots of other show commands as well.
      mysql-test/t/sp.test:
        New test case for BUG#4902, with lots of other show commands as well.
      sql/sp_head.cc:
        The check for possible multiple result commands was becomming unwieldly,
        so we moved it to a separate function, and added loads of new command codes
        to the test.
      sql/sp_head.h:
        The check for possible multiple result commands was becomming unwieldly,
        so we moved it to a separate function.
      sql/sql_yacc.yy:
        The check for possible multiple result commands was becomming unwieldly,
        so we moved it to a separate function.
      6901fd55
  6. 04 Aug, 2004 2 commits
  7. 03 Aug, 2004 6 commits
    • unknown's avatar
      Followup3: operator new and operator delete are defined in mysys. · eb2d22d9
      unknown authored
      The fix makes client_test.cc compile with embedded library.
      
      eb2d22d9
    • unknown's avatar
      Followup2 (new commands are supported in prepared statements): test files · f4676fd6
      unknown authored
      should've been fixed as well.
      
      
      mysql-test/include/ps_modify.inc:
        Followup2 (new commands are supported in prepared statements):
        - no more error is expected here
      mysql-test/t/ps_1general.test:
        Followup2 (new commands are supported in prepared statements): 
        - no more error expected here
      f4676fd6
    • unknown's avatar
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 0a1d860a
      unknown authored
      into mysql.com:/home/kostja/mysql/mysql-5.0-sap-new
      
      
      sql/sp.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      0a1d860a
    • unknown's avatar
      Port of cursors to be pushed into 5.0 tree: · e14f5a85
      unknown authored
      - client side part is simple and may be considered stable
      - server side part now just joggles with THD state to save execution
        state and has no additional locking wisdom.
        Lot's of it are to be rewritten.
      
      
      include/mysql.h:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - new statement attribute STMT_ATTR_CURSOR_TYPE
        - MYSQL_STMT::flags to store statement cursor type
        - MYSQL_STMT::server_status to store server status (i. e. if the server
        was able to open a cursor for this query).
      include/mysql_com.h:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - new COMmand, COM_FETCH, to fetch K rows from read-only cursor.
          By design should support scrollable cursors as well.
        - a few new server statuses:
          SERVER_STATUS_CURSOR_EXISTS is sent by server in reply to COM_EXECUTE,
          when cursor was successfully opened for this query
          SERVER_STATUS_LAST_ROW_SENT is sent along with the last row to prevent one
          more round trip just for finding out that all rows were fetched from 
          this cursor (this is server mem savier also).
        - and finally, all possible values of STMT_ATTR_CURSOR_TYPE, 
          while now we support only CURSORT_TYPE_NO_CURSOR and 
          CURSOR_TYPE_READ_ONLY
      libmysql/libmysql.c:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - simple additions to mysql_stmt_fetch implementation to read data 
          from an opened cursor: we can read up to iteration count rows per
          one request; read rows are buffered in the same way as rows of
          mysql_stmt_store_result.
        - now send stmt->flags to server to let him now if we wish to have 
          a cursor for this statement.
        - support for setting/getting statement cursor type.
      libmysqld/examples/Makefile.am:
        Testing cursors was originally implemented in C++. Now when these tests
        go into client_test, it's time to convert it to C++ as well.
      libmysqld/lib_sql.cc:
        - cleanup: send_fields flags are now named.
      sql/ha_innodb.cc:
        - cleanup: send_fields flags are now named.
      sql/mysql_priv.h:
        - cursors support: declaration for server-side handler of COM_FETCH
      sql/protocol.cc:
        - cleanup: send_fields flags are now named.
        - we can't anymore assert that field_types[field_pos] is sensible:
          if we have COM_EXCUTE(stmt1), COM_EXECUTE(stmt2), COM_FETCH(stmt1)
          field_types[field_pos] will point to fields of stmt2.
      sql/protocol.h:
        - cleanup: send_fields flag_s_ are now named.
      sql/protocol_cursor.cc:
        - cleanup: send_fields flags are now named.
      sql/repl_failsafe.cc:
        - cleanup: send_fields flags are now named.
      sql/slave.cc:
        - cleanup: send_fields flags are now named.
      sql/sp.cc:
        - cleanup: send_fields flags are now named.
      sql/sp_head.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_acl.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_class.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_class.h:
        - cleanup: send_fields flags are now named.
      sql/sql_error.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_handler.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_help.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_parse.cc:
        Server side support for cursors:
        - handle COM_FETCH
        - enforce assumption that whenever we free thd->free_list, 
          we reset it to zero. This way it's much easier to handle free_list
          in prepared statements implementation.
      sql/sql_prepare.cc:
        Server side support for cursors:
        - implementation of mysql_stmt_fetch (fetch some rows from open cursor).
        - management of cursors memory is quite tricky now.
        - execute_stmt can't be reused anymore in mysql_stmt_execute and 
          mysql_sql_stmt_execute
      sql/sql_repl.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_select.cc:
        Server side support for cursors:
        - implementation of Cursor::open, Cursor::fetch (buggy when it comes to
          non-equi joins), cursor cleanups.
        - -4 -3 -0 constants indicating return value of sub_select and end_send are
          to be renamed to something more readable:
          it turned out to be not so simple, so it should come with the other patch.
      sql/sql_select.h:
        Server side support for cursors:
        - declaration of Cursor class.
        - JOIN::fetch_limit contains runtime value of rows fetched via cursor.
      sql/sql_show.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_table.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_union.cc:
        - if there was a cursor, don't cleanup unit: we'll need it to fetch
          the rest of the rows.
      tests/Makefile.am:
        Now client_test is in C++.
      tests/client_test.cc:
        A few elementary tests for cursors.
      BitKeeper/etc/ignore:
        Added libmysqld/examples/client_test.cc to the ignore list
      e14f5a85
    • unknown's avatar
      - bumped up version number in configure.in to 5.0.2-alpha, now that · 22bafed5
      unknown authored
         5.0.1 is out
       - tagged ChangeSet@1.1698 as "mysql-5.0.1"
      
      
      configure.in:
         - bumped up version number in configure.in to 5.0.2-alpha, now that
           5.0.1 is out
      22bafed5
  8. 02 Aug, 2004 1 commit
    • unknown's avatar
      WL#2001: Optimize stored procedure code. · 58fa46dd
      unknown authored
      Added a simple optimizer that shortcuts jumps and skip unused instructions.
      
      
      sql/sp.cc:
        Optimize the code after parsing.
      sql/sp_head.cc:
        Added a simple optimizer that shortcuts jumps and skip unused instructions.
      sql/sp_head.h:
        Added a simple optimizer that shortcuts jumps and skip unused instructions.
      58fa46dd
  9. 29 Jul, 2004 2 commits
    • unknown's avatar
      Fixed BUG#434: Stored procedure which drops itself causes crash. · 3a427789
      unknown authored
      Simply disallow it, just as we disallow creation of routines from within
      other SPs.
      
      
      include/mysqld_error.h:
        New error code for when attempting to drop a stored routine from within
        another stored routine.
      mysql-test/r/sp-error.result:
        New test case for BUG#4344.
      mysql-test/t/sp-error.test:
        New test case for BUG#4344.
      sql/share/czech/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/danish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/dutch/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/english/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/estonian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/french/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/german/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/greek/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/hungarian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/italian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/japanese/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/korean/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/norwegian-ny/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/norwegian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/polish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/portuguese/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/romanian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/russian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/serbian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/slovak/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/spanish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/swedish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/ukrainian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/sql_yacc.yy:
        Don't allow drop function/procedure from within another function/procedure.
      3a427789
    • unknown's avatar
      Fixed BUG#4318: Stored Procedure packet error if HANDLER statement, · 2c34474a
      unknown authored
      at least partially. It doesn't crash or give packets out of order
      any more, but it's unclear why it doesn't actually return anything
      from within an SP. This should be investigated at some point, but
      for the moment this will have to do. (It is a rather obscure feature... :)
      
      
      mysql-test/r/sp.result:
        Test case for BUG#4318.
      mysql-test/t/sp.test:
        Test case for BUG#4318.
      sql/sql_yacc.yy:
        Recognize HANDLER READ as another statement that might result in multiple results.
      2c34474a
  10. 28 Jul, 2004 1 commit
  11. 26 Jul, 2004 6 commits
    • unknown's avatar
      compatibility fixes · c35ca06b
      unknown authored
      
      mysql-test/r/show_check.result:
        results updated
      sql/opt_range.cc:
        wrong (I believe :) cast fixed
      c35ca06b
    • unknown's avatar
      one more test should wait for WL#1324 (tablename to filename encoding) · e1cd8ee3
      unknown authored
      non-ascii filenames work weird (e.g. on MacOSX)
      
      e1cd8ee3
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0/ · 35d2e759
      unknown authored
      into serg.mylan:/usr/home/serg/Abk/mysql-5.0
      
      35d2e759
    • unknown's avatar
      Merge · 39fab5e4
      unknown authored
      
      mysql-test/t/sp.test:
        SCCS merged
      39fab5e4
    • unknown's avatar
      Replication: various small fixes specific to the new binlog format of 5.0 · cc7819df
      unknown authored
      (including one which may explain autobuild's failure of yesterday)
      
      
      client/mysqlbinlog.cc:
        - In mysqlbinlog, we should not reset the Format event when we see Rotate. If a binlog started with a Format event, it is not going to switch later to 4.0 format.
        I had already did the same fix in Rotate_log_event::exec_event() in replication.
        - Fix for a merge bug.
      sql/log_event.cc:
        An event with an uninited catalog (read from a 4.x server) is not the same as an event with a NULL catalog
        (5.0 server which did not specify catalog), the difference is that they are not in the same format;
        so I introduce a way to know if the catalog has been inited or not. This fixes a rpl_trunc_binlog failure
        I had.
        When we leave Load_log_event::exec_event(), we must reset thd->catalog to 0, like we already do
        in Query_log_event::exec_event(). This fixes a Valgrind error which popped in rpl_charset (which may
        be what caused autobuild to crash yesterday).
        And a fix for event's parsing (the position was always computed right because start_dup==end is always true
        and will until we add new string members to Query_log_event.
      sql/log_event.h:
        catalog_len changed from uint to int to allow -1, which means "not inited"
        (I preferred to do it like this rather than create a new bool var Query_log_event::catalog_inited
        like we have in Query_log_event::sql_mode_inited; that's because catalog will not use the whole range of int,
        so it's allowed to pick -1 as a special value and have only one var.
      sql/slave.cc:
        comments
      cc7819df
    • unknown's avatar
      results updated · 66346468
      unknown authored
      66346468
  12. 23 Jul, 2004 10 commits