An error occurred fetching the project authors.
  1. 14 Feb, 2007 1 commit
  2. 13 Feb, 2007 1 commit
  3. 12 Feb, 2007 1 commit
    • 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
  4. 09 Feb, 2007 1 commit
    • unknown's avatar
      Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is · 308da651
      unknown authored
      present.
      
      A view created with CREATE VIEW ... ORDER BY ... cannot be resolved with
      the MERGE algorithm, even when no other part of the CREATE VIEW statement
      would require the view to be resolved using the TEMPTABLE algorithm.
      
      The check for presence of the ORDER BY clause in the underlying select is 
      removed from the st_lex::can_be_merged() function.
      The ORDER BY list of the underlying select is appended to the ORDER BY list 
      
      
      mysql-test/t/view.test:
        Added a test case for bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
      mysql-test/r/view.result:
        Added a test case for bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
      sql/sql_lex.cc:
        Bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
        The st_lex::can_be_merged() function now allows views with the ORDER BY
        clause to be resolved using MERGE algorithm. The ORDER BY list of the view 
        is appended to the ORDER BY list of the embedding select.
      308da651
  5. 07 Feb, 2007 2 commits
    • unknown's avatar
      Fixed bug #25931. · 3609c3a4
      unknown authored
      View check option clauses were ignored for updates of multi-table
      views when the updates could not be performed on fly and the rows
      to update had to be put into temporary tables first.
      
      
      
      mysql-test/r/view.result:
        Added a test case for bug #25931.
      mysql-test/t/view.test:
        Added a test case for bug #25931.
        Adjusted another existed test case to have the correct result.
      sql/sql_update.cc:
        Fixed bug #25931.
        View check option clauses were ignored for updates of multi-table
        views when the updates could not be performed on fly and the rows
        to update had to be put into temporary tables first.
        Added the required check to multi_update::do_updates to fix the problem.
      3609c3a4
    • unknown's avatar
      Fixed bug #26124: SELECT from a view wrapper over a table · 3a54e593
      unknown authored
      with a column of the DATETIME type could return a wrong 
      result set if the WHERE clause included a BETWEEN condition
      on the column.
      Fixed the method Item_func_between::fix_length_and_dec
      where the aggregation type for BETWEEN predicates calculated
      incorrectly if the first argument was a view column of the
      DATETIME type.
      
      
      mysql-test/r/view.result:
        Added a test case for bug #26124.
      mysql-test/t/view.test:
        Added a test case for bug #26124.
      3a54e593
  6. 24 Jan, 2007 2 commits
    • unknown's avatar
      merge of 5.0-opt -> 5.1-opt · 6098f770
      unknown authored
      6098f770
    • unknown's avatar
      bug #22682 Test fails --without-geometry · f469aa00
      unknown authored
      geometry dependent parts moved to proper .test files
      
      
      mysql-test/r/gis.result:
        result fixed
      mysql-test/r/innodb.result:
        result fixed
      mysql-test/r/innodb_gis.result:
        result fixed
      mysql-test/r/view.result:
        result fixed
      mysql-test/t/gis.test:
        HAVE_GEOMETRY dependent part moved here from view.test
      mysql-test/t/innodb.test:
        HAVE_GEOMETRY dependent part moved to innodb_gis.test
      BitKeeper/etc/ignore:
        Added libmysqld/sql_servers.cc to the ignore list
      mysql-test/t/innodb_gis.test:
        HAVE_GEOMETRY dependent part moved here from innodb.test
      mysql-test/t/view.test:
        HAVE_GEOMETRY dependent part moved to gis.test
      f469aa00
  7. 22 Jan, 2007 3 commits
    • unknown's avatar
      Change to new (after merge) error numbers · f7e838c5
      unknown authored
      mysql-test/extra/rpl_tests/rpl_trig004.test:
        Fixed bug in last push
      mysql-test/r/create.result:
        Fixed error number
      mysql-test/r/rpl_sp.result:
        Fixed error number
      mysql-test/r/sp.result:
        Fixed error number
      mysql-test/r/view.result:
        Better fix for now() handling
      mysql-test/t/ndb_basic.test:
        Use error names instead of numbers
      mysql-test/t/ndb_index_unique.test:
        Use error names instead of numbers
      mysql-test/t/rpl_skip_error-slave.opt:
        Change to new error number
      mysql-test/t/sp.test:
        Change to new error number
      mysql-test/t/view.test:
        Better fix for now() handling
      f7e838c5
    • unknown's avatar
      Change to new (after merge) error numbers · 560049cb
      unknown authored
      mysql-test/r/create.result:
        Fixed error number
      mysql-test/r/rpl_sp.result:
        Fixed error number
      mysql-test/r/sp.result:
        Fixed error number
      mysql-test/r/view.result:
        Better fix for now() handling
      mysql-test/t/ndb_basic.test:
        Use error names instead of numbers
      mysql-test/t/ndb_index_unique.test:
        Use error names instead of numbers
      mysql-test/t/rpl_skip_error-slave.opt:
        Change to new error number
      mysql-test/t/sp.test:
        Change to new error number
      mysql-test/t/view.test:
        Better fix for now() handling
      560049cb
    • unknown's avatar
      Give warnings for unused objects · b4f80eed
      unknown authored
      Changed error message to be compatible with old error file
      Added new error message for new DUP_ENTRY syntax
      
      
      BUILD/SETUP.sh:
        Give warnings for unused objects
      mysql-test/extra/binlog_tests/insert_select-binlog.test:
        Changed to use new error message
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_auto_increment.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_foreign_key.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_insert_id.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_insert_id_pk.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_loaddata.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_row_basic.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test:
        Changed to use new error message
      mysql-test/extra/rpl_tests/rpl_trig004.test:
        Changed to use new error message
      mysql-test/include/mix1.inc:
        Changed to use new error message
      mysql-test/include/mix2.inc:
        Changed to use new error message
      mysql-test/include/ps_modify.inc:
        Changed to use new error message
      mysql-test/include/query_cache.inc:
        Changed to use new error message
      mysql-test/include/varchar.inc:
        Changed to use new error message
      mysql-test/r/create.result:
        Changed to use new error message
      mysql-test/r/rpl_sp.result:
        Changed to use new error message
      mysql-test/r/sp.result:
        Changed to use new error message
      mysql-test/r/view.result:
        Changed to use new error message
      mysql-test/t/auto_increment.test:
        Changed to use new error message
      mysql-test/t/create.test:
        Changed to use new error message
      mysql-test/t/create_select_tmp.test:
        Changed to use new error message
      mysql-test/t/ctype_utf8.test:
        Changed to use new error message
      mysql-test/t/delayed.test:
        Changed to use new error message
      mysql-test/t/heap.test:
        Changed to use new error message
      mysql-test/t/heap_btree.test:
        Changed to use new error message
      mysql-test/t/heap_hash.test:
        Changed to use new error message
      mysql-test/t/innodb.test:
        Changed to use new error message
      mysql-test/t/insert_select.test:
        Changed to use new error message
      mysql-test/t/insert_update.test:
        Changed to use new error message
      mysql-test/t/join_outer.test:
        Changed to use new error message
      mysql-test/t/key.test:
        Changed to use new error message
      mysql-test/t/merge.test:
        Changed to use new error message
      mysql-test/t/myisam.test:
        Changed to use new error message
      mysql-test/t/ndb_charset.test:
        Changed to use new error message
      mysql-test/t/ndb_index_unique.test:
        Changed to use new error message
      mysql-test/t/ndb_insert.test:
        Changed to use new error message
      mysql-test/t/ndb_replace.test:
        Changed to use new error message
      mysql-test/t/ndb_update.test:
        Changed to use new error message
      mysql-test/t/replace.test:
        Changed to use new error message
      mysql-test/t/rpl_err_ignoredtable.test:
        Changed to use new error message
      mysql-test/t/rpl_row_create_table.test:
        Changed to use new error message
      mysql-test/t/rpl_skip_error-slave.opt:
        Changed to use new error message
      mysql-test/t/rpl_sp.test:
        Changed to use new error message
      mysql-test/t/show_check.test:
        Changed to use new error message
      mysql-test/t/sp-error.test:
        Changed to use new error message
      mysql-test/t/sp.test:
        Changed to use new error message
      mysql-test/t/sp_trans.test:
        Changed to use new error message
      mysql-test/t/temp_table.test:
        Changed to use new error message
      mysql-test/t/type_binary.test:
        Changed to use new error message
      mysql-test/t/type_bit.test:
        Changed to use new error message
      mysql-test/t/type_bit_innodb.test:
        Changed to use new error message
      mysql-test/t/type_blob.test:
        Changed to use new error message
      mysql-test/t/type_varchar.test:
        Changed to use new error message
      mysql-test/t/view.test:
        Changed to use new error message
      sql/handler.cc:
        ER_DUP_ENTRY -> ER_DUP_ENTRY_WITH_KEY_NAME
      sql/share/errmsg.txt:
        Changed error message to be compatible with old error file
        Added new error message for new DUP_ENTRY syntax
      sql/sql_table.cc:
        ER_DUP_ENTRY -> ER_DUP_ENTRY_WITH_KEY_NAME
      sql-bench/example:
        Example file for how to run tests
      b4f80eed
  8. 18 Jan, 2007 1 commit
    • unknown's avatar
      Fixed bug #25580: incorrect stored representations of views in cases · af321686
      unknown authored
      when they contain the '!' operator.
      Added an implementation for the method Item_func_not::print. 
      The method encloses any NOT expression into extra parentheses to avoid
      incorrect stored representations of views that use the '!' operators.
      Without this change when a view was created that contained
      the expression !0*5  its stored representation contained not this
      expression but rather the expression not(0)*5 . 
      The operator '!' is of a higher precedence than '*', while NOT is 
      of a lower precedence than '*'. That's why the expression !0*5 
      is interpreted as not(0)*5, while the expression not(0)*5 is interpreted
      as not((0)*5) unless sql_mode is set to HIGH_NOT_PRECEDENCE.
      Now we translate !0*5 into (not(0))*5. 
      
      
      mysql-test/r/sp-code.result:
        Adjusted results after the fix of bug 25580.
      mysql-test/r/subselect.result:
        Adjusted results after the fix of bug 25580.
      mysql-test/r/view.result:
        Added a test case for bug #25580.
      mysql-test/t/view.test:
        Added a test case for bug #25580.
      sql/item_cmpfunc.cc:
        Fixed bug #25580: incorrect stored representations of views in cases
        when they contain the '!' operator.
        Added an implementation for the method Item_func_not::print. 
        The method encloses the NOT expression into extra parenthesis to avoid
        incorrect stored representations of views that use the '!' operators.
      sql/item_cmpfunc.h:
        Fixed bug #25580: incorrect stored representations of views in cases
        when they contain the '!' operator.
        Added an implementation for the method Item_func_not::print. 
        The method encloses the NOT expression into extra parenthesis to avoid
        incorrect stored representations of views that use the '!' operators.
      af321686
  9. 07 Jan, 2007 1 commit
  10. 06 Jan, 2007 1 commit
  11. 02 Jan, 2007 1 commit
    • unknown's avatar
      view.result: · 2e99ee90
      unknown authored
        Temporary work around for bug#25359
      
      
      mysql-test/r/view.result:
        Temporary work around for bug#25359
      2e99ee90
  12. 19 Dec, 2006 1 commit
    • unknown's avatar
      Fix for BUG#24293: '\Z' token is not handled correctly in views. · b66ab7f8
      unknown authored
      If SELECT-part of CREATE VIEW statement contains '\Z',
      it is not handled correctly.
      
      The problem was in String::print().
      Symbol with code 032 (26) is replaced with '\z',
      which is not supported by the lexer.
      
      The fix is to replace the symbol with '\Z'.
      
      
      mysql-test/r/view.result:
        Update result file.
      mysql-test/t/view.test:
        Add test case for BUG#24293.
      sql/sql_string.cc:
        We should replace 032 with \Z, since lexer does not understand \z.
      b66ab7f8
  13. 02 Nov, 2006 1 commit
    • unknown's avatar
      Bug#21114 (Foreign key creation fails to table with name format) · 384407aa
      unknown authored
      Due to the complexity of this change, everything is documented in WL#3565
      
      This patch is the third iteration, it takes into account the comments
      received to date.
      
      
      mysql-test/r/func_math.result:
        Improved test coverage
      mysql-test/r/view.result:
        Name collision, x() is a geometry native in function
      mysql-test/t/func_math.test:
        Improved test coverage
      mysql-test/t/view.test:
        Name collision, x() is a geometry native in function
      sql/item_create.cc:
        Revised the create_func implementation
      sql/item_create.h:
        Revised the create_func implementation
      sql/item_geofunc.h:
        Explicit Item allocation in the thread memory pool.
      sql/lex.h:
        Removed function parsing from the lexical parser
      sql/lex_symbol.h:
        Removed function parsing from the lexical parser
      sql/mysql_priv.h:
        Server initialization and shutdown
      sql/mysqld.cc:
        Server initialization and shutdown
      sql/share/errmsg.txt:
        New error messages
      sql/sql_yacc.yy:
        Removed function parsing from the lexical parser
      tests/mysql_client_test.c:
        Spaces are no longer significant for function calls
      mysql-test/include/parser_bug21114.inc:
        New tests
      mysql-test/r/parser.result:
        New tests
      mysql-test/r/parser_bug21114_innodb.result:
        New tests
      mysql-test/t/parser.test:
        New tests
      mysql-test/t/parser_bug21114_innodb.test:
        New tests
      384407aa
  14. 27 Oct, 2006 1 commit
    • unknown's avatar
      BUG#22584: last_insert_id not updated after inserting a record through · 532735e6
      unknown authored
      a updatable view.
      
      When there's a VIEW on a base table that have AUTO_INCREMENT column, and
      this VIEW doesn't provide an access such column, after INSERT to such
      VIEW LAST_INSERT_ID() did not return the value just generated.
      
      This behaviour is intended and correct, because if the VIEW doesn't list
      some columns then these columns are effectively hidden from the user,
      and so any side effects of inserting default values to them.
      
      However, there was a bug that such statement inserting into a view would
      reset LAST_INSERT_ID() instead of leaving it unchanged.
      
      This patch restores the original value of LAST_INSERT_ID() instead of
      resetting it to zero.
      
      
      mysql-test/r/view.result:
        Add result for bug#22584: last_insert_id not updated after inserting
        a record through a updatable view.
      mysql-test/t/view.test:
        Add test case for bug#22584: last_insert_id not updated after inserting
        a record through a updatable view.
      sql/sql_parse.cc:
        When we have inserted into a view, and AUTO_INCREMENT column is not
        accessed from this view, instead of setting LAST_INSERT_ID to zero set
        it to the value it had before this statement was executed.
      532735e6
  15. 23 Oct, 2006 2 commits
    • unknown's avatar
      Post-merge fixes. · 66b87280
      unknown authored
      mysql-test/r/sp.result:
        Update results.
      mysql-test/r/view.result:
        Update results.
      server-tools/instance-manager/guardian.cc:
        Post-merge fixes (instance_name is a LEX_STRING).
      server-tools/instance-manager/instance.cc:
        Post-merge fixes (instance_name is a LEX_STRING).
      66b87280
    • unknown's avatar
      A post-merge fix. · 6831ea7d
      unknown authored
      6831ea7d
  16. 17 Oct, 2006 1 commit
    • unknown's avatar
      Fix previous bad patch for Bug#14262. · 48dfeb4d
      unknown authored
      Remove table engine qualification where it's unnecessary.
      
      
      mysql-test/r/view.result:
        Remove requirement for innodb where not needed.  (Running this test alone
        raised warnings that it was using myisam.)
      mysql-test/t/view.test:
        Remove requirement for innodb where not needed.  (Running this test alone
        raised warnings that it was using myisam.)
      sql/sql_parse.cc:
        Fix previous bad re-patch.
      sql/sql_view.cc:
        Fix previous bad re-patch.
      48dfeb4d
  17. 16 Oct, 2006 1 commit
    • unknown's avatar
      Bug#21370: View renaming lacks tablename_to_filename encoding · 81eb1ccd
      unknown authored
        Problem: renaming of FRM file and ARC files didn't use file name
        encoding, so RENAME TABLE for views failed for views having
        "tricky" characters in their names.
        Fix: adding build_table_filename() in missing places.
      
      
      mysql-test/r/view.result:
        Adding test case
      mysql-test/t/view.test:
        Adding test case
      sql/parse_file.cc:
        Adding build_table_filename()
      sql/sql_view.cc:
        Adding build_table_filename()
      81eb1ccd
  18. 12 Oct, 2006 1 commit
    • unknown's avatar
      BUG#20953: create proc with a create view that uses local vars/params · 6d1fdc73
      unknown authored
                 should fail to create
      
      The problem was that this type of errors was checked during view
      creation, which doesn't happen when CREATE VIEW is a statement of
      a created stored routine.
      
      The solution is to perform the checks at parse time.  The idea of the
      fix is that the parser checks if a construction just parsed is allowed
      in current circumstances by testing certain flags, and this flags are
      reset for VIEWs.
      
      The side effect of this change is that if the user already have
      such bogus routines, it will now get a error when trying to do
      
        SHOW CREATE PROCEDURE proc;
      
      (and some other) and when trying to execute such routine he will get
      
        ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
      
      However there should be very few such users (if any), and they may
      (and should) drop these bogus routines.
      
      
      mysql-test/r/sp-error.result:
        Add result for bug#20953: create proc with a create view that uses
        local vars/params should fail to create.
      mysql-test/r/view.result:
        Update results.
      mysql-test/t/sp-error.test:
        Add test case for bug#20953: create proc with a create view that uses
        local vars/params should fail to create.
      mysql-test/t/view.test:
        Add second test for variable in a view.
        Remove SP variable in a view test, as it tests wrong behaviour.
        Add test for derived table in a view.
      sql/sql_lex.cc:
        Remove LEX::variables_used.
      sql/sql_lex.h:
        Remove LEX::variables_used and add st_parsing_options structure and
        LEX::parsing_options member.
      sql/sql_view.cc:
        Move some error checking to sql/sql_yacc.yy.
      sql/sql_yacc.yy:
        Check for disallowed syntax in a CREATE VIEW at parse time to rise a
        error when it is used inside CREATE PROCEDURE and CREATE FUNCTION, as
        well as by itself.
      6d1fdc73
  19. 10 Oct, 2006 2 commits
    • unknown's avatar
      Fix after manial merge. · c942d5bf
      unknown authored
      c942d5bf
    • unknown's avatar
      Bug#19111: TRIGGERs selecting from a VIEW on the firing base table fail. · 469ff92d
      unknown authored
      In a trigger or a function used in a statement it is possible to do
      SELECT from a table being modified by the statement.  However,
      encapsulation of such SELECT into a view and selecting from a view
      instead of direct SELECT was not possible.
      
      This happened because tables used by views (which in their turn
      were used from functions/triggers) were not excluded from checks
      in unique_table() routine as it happens for the rest of tables
      added to the statement table list for prelocking.
      
      With this fix we ignore all such tables in unique_table(), thus
      providing consistency: inside a trigger or a functions SELECT from
      a view may be used where plain SELECT is allowed.  Modification of
      the same table from function or trigger is still disallowed.  Also,
      this patch doesn't affect the case where SELECT from the table being
      modified is done outside of function of trigger, such SELECTs are
      still disallowed (this limitation and visibility problem when function
      select from a table being modified are subjects of bug 21326).  See
      also bug 22427.
      
      
      mysql-test/r/view.result:
        Add result for bug#19111: TRIGGERs selecting from a VIEW on the
        firing base table fail.
      mysql-test/t/view.test:
        Add test case for bug#19111: TRIGGERs selecting from a VIEW on the
        firing base table fail.
      sql/sql_base.cc:
        In unique_table() do not check tables that are used in a stored
        function or a trigger ('prelocking_placeholder' is set).  If such
        function or a trigger will attempt to modify a table, the error will
        be given, however select is allowed there.
      469ff92d
  20. 29 Sep, 2006 1 commit
    • unknown's avatar
      bug #16813 (WITH CHECK OPTION fails with UPDATE) · 5389cc16
      unknown authored
      We use the condition from CHECK OPTION twice handling UPDATE command.
      First we construnct 'update_cond' AND 'option_cond'
      condition to select records to be updated, then we check the
      'option_cond' for the updated row.
      The problem is that first 'AND' condition is optimized during the 'select'
      which can break 'option_cond' structure, so it will be unusable for
      the sectond use - to check the updated row.
      Possible soultion is either use copy of the condition in the first
      use or to make optimization less traumatic for the operands.
      I picked the first one. 
      
      
      mysql-test/r/view.result:
        result fixed
      mysql-test/t/view.test:
        testcase
      sql/table.cc:
        now we use the copy of the CHECK OPTION condition to construct
        the select's condition
      5389cc16
  21. 28 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug#5505: Wrong error message on INSERT into a view · d332c37c
      unknown authored
      On an INSERT into an updatable but non-insertable view an error message was
      issued stating the view being not updatable. This can lead to a confusion of a
      user.
      
      A new error message is introduced. Is is showed when a user tries to insert
      into a non-insertable view.
      
      
      sql/sql_base.cc:
        Fixed bug#5505: Wrong error message on INSERT into a view
        The update_non_unique_table_error() function now issues proper
        error for an INSERT.
      sql/sql_insert.cc:
        Fixed bug#5505: Wrong error message on INSERT into a view
        Issue the ER_NON_INSERTABLE_TABLE error instead of the 
        ER_NON_UPDATABLE_TABLE on insert into a view.
      sql/sql_view.cc:
        Fixed bug#5505: Wrong error message on INSERT into a view
        Issue the ER_NON_INSERTABLE_TABLE error instead of the
        ER_NON_UPDATABLE_TABLE on insert into a view.
      mysql-test/r/view.result:
        Added the test case for bug#5505: Wrong error message on INSERT into a view
        Corrected a few test cases after fixing bug#5505
      mysql-test/t/view.test:
        Added the test case for bug#5505: Wrong error message on INSERT into a view
        Corrected a few test cases after fixing bug#5505
      sql/share/errmsg.txt:
        Fixed bug#5505: Wrong error message on INSERT into a view
        Added the ER_NON_INSERTABLE_TABLE error definition.
      d332c37c
  22. 25 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug #21646. · f0bd502a
      unknown authored
      Presence of a subquery in the ON expression of a join 
      should not block merging the view that contains this join.
      Before this patch the such views were converted into 
      into temporary table views.
      
      
      mysql-test/r/view.result:
        Added a test case for bug #21646.
      mysql-test/t/view.test:
        Added a test case for bug #21646.
      sql/mysql_priv.h:
        Fixed bug #21646.
        Added a new parsing state 'IN_ON', true when
        the parser is in an ON expression of a join.
      sql/sql_lex.cc:
        Fixed bug #21646.
        Presence of a subquery in the ON expression of a join 
        should not block merging the view that contains this join.
      sql/sql_yacc.yy:
        Fixed bug #21646.
        Added a new parsing state 'IN_ON', true when
        the parser is in an ON expression of a join.
      f0bd502a
  23. 18 Sep, 2006 1 commit
  24. 14 Sep, 2006 1 commit
    • unknown's avatar
      type_date.result: · 0847bd9c
      unknown authored
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
        Corrected a test case after removal of fix for bug#16377
      query_cache.result, func_time.test, view.result, view.test, func_time.result:
        Corrected a test case after removal of fix for bug#16377
      type_date.test:
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
         Corrected a test case after removal of fix for bug#16377
      item_cmpfunc.cc:
        Removed changes to the Item_func_between::fix_length_and_dec() made in the fix for bug#16377
      
      
      mysql-test/t/view.test:
        Corrected a test case after removal of fix for bug#16377
      mysql-test/t/type_date.test:
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
         Corrected a test case after removal of fix for bug#16377
      mysql-test/t/func_time.test:
        Corrected a test case after removal of fix for bug#16377
      mysql-test/r/view.result:
        Corrected a test case after removal of fix for bug#16377
      mysql-test/r/type_date.result:
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
        Corrected a test case after removal of fix for bug#16377
      mysql-test/r/query_cache.result:
        Corrected a test case after removal of fix for bug#16377
      mysql-test/r/func_time.result:
        Corrected a test case after removal of fix for bug#16377
      sql/item_cmpfunc.cc:
        Removed changes to the Item_func_between::fix_length_and_dec() made in the fix for bug#16377
      0847bd9c
  25. 06 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug #5500: EXPLAIN returned a wrong select_type for queries using views. · 22c3e7b4
      unknown authored
      Select_type in the EXPLAIN output for the query SELECT * FROM t1 was
      'SIMPLE', while for the query SELECT * FROM v1, where the view v1
      was defined as SELECT * FROM t1, the EXPLAIN output contained 'PRIMARY'
      for the select_type column.
       
      
      
      mysql-test/r/group_by.result:
        Adjusted results after the fix for bug #5500.
      mysql-test/r/information_schema.result:
        Adjusted results after the fix for bug #5500.
      mysql-test/r/olap.result:
        Adjusted results after the fix for bug #5500.
      mysql-test/r/range.result:
        Adjusted results after the fix for bug #5500.
      mysql-test/r/view.result:
        Added a test case for bug #5500.
        Adjusted other results.
      mysql-test/r/view_grant.result:
        Adjusted results after the fix for bug #5500.
      mysql-test/t/view.test:
        Added a test case for bug #5500.
      22c3e7b4
  26. 29 Aug, 2006 2 commits
    • unknown's avatar
      Post-merge fixes. · 8f0b5afa
      unknown authored
      mysql-test/r/view.result:
        A post-merge fix.
      mysql-test/t/grant.test:
        A post-merge fix.
      mysql-test/t/view.test:
        A post-merge fix.
      8f0b5afa
    • unknown's avatar
      BUG#17591: Updatable view not possible with trigger or stored function · 7a5a2544
      unknown authored
      When a view was used inside a trigger or a function, lock type for
      tables used in a view was always set to READ (thus making the view
      non-updatable), even if we were trying to update the view.
      
      The solution is to set lock type properly.
      
      
      mysql-test/r/view.result:
        Add result for bug#17591: Updatable view not possible with trigger
        or stored function.
      mysql-test/t/view.test:
        Add test case for bug#17591: Updatable view not possible with trigger
        or stored function.
      sql/sql_view.cc:
        Move the code that sets requested lock type before the point where
        we exit from mysql_make_view() when we process a placeholder for
        prelocked table.
      7a5a2544
  27. 24 Aug, 2006 1 commit
    • unknown's avatar
      Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause · 21e6836b
      unknown authored
          
      User name (host name) has limit on length. The server code relies on these
      limits when storing the names. The problem was that sometimes these limits
      were not checked properly, so that could lead to buffer overflow.
        
      The fix is to check length of user/host name in parser and if string is too
      long, throw an error.
      
      
      mysql-test/r/grant.result:
        Updated result file.
      mysql-test/r/sp.result:
        Updated result file.
      mysql-test/r/trigger.result:
        Updated result file.
      mysql-test/r/view.result:
        Updated result file.
      mysql-test/t/grant.test:
        Added test for BUG#16899.
      mysql-test/t/sp.test:
        Added test for BUG#16899.
      mysql-test/t/trigger.test:
        Added test for BUG#16899.
      mysql-test/t/view.test:
        Added test for BUG#16899.
      sql/mysql_priv.h:
        Added prototype for new function.
      sql/sql_acl.cc:
        Remove outdated checks.
      sql/sql_parse.cc:
        Add a new function for checking string length.
      sql/share/errmsg.txt:
        Added new resources.
      sql/sql_yacc.yy:
        Check length of user/host name.
      21e6836b
  28. 23 Aug, 2006 2 commits
    • unknown's avatar
      view.result, view.test: · d0394c70
      unknown authored
        Corrected test case for the bug#21261
      sql_parse.cc:
        Corrected fix for bug#21261
      
      
      mysql-test/t/view.test:
        Corrected test case for the bug#21261
      mysql-test/r/view.result:
        Corrected test case for the bug#21261
      sql/sql_parse.cc:
        Corrected fix for bug#21261
      d0394c70
    • unknown's avatar
      Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause · f96ee72f
      unknown authored
        
      User name (host name) has limit on length. The server code relies on these
      limits when storing the names. The problem was that sometimes these limits
      were not checked properly, so that could lead to buffer overflow.
      
      The fix is to check length of user/host name in parser and if string is too
      long, throw an error.
      
      
      mysql-test/r/grant.result:
        Updated result file.
      mysql-test/r/sp.result:
        Updated result file.
      mysql-test/r/trigger.result:
        Updated result file.
      mysql-test/r/view.result:
        Updated result file.
      mysql-test/t/grant.test:
        Added test for BUG#16899.
      mysql-test/t/sp.test:
        Added test for BUG#16899.
      mysql-test/t/trigger.test:
        Added test for BUG#16899.
      mysql-test/t/view.test:
        Added test for BUG#16899.
      sql/mysql_priv.h:
        Added prototype for new function.
      sql/share/errmsg.txt:
        Added new resources.
      sql/sql_acl.cc:
        Remove outdated checks.
      sql/sql_parse.cc:
        Add a new function for checking string length.
      sql/sql_yacc.yy:
        Check length of user/host name.
      f96ee72f
  29. 17 Aug, 2006 1 commit
    • unknown's avatar
      ndb_condition_pushdown.result: · 1cbebc6e
      unknown authored
        Corrected test case result after fix for bug#18165
      view.result, view.test:
        Corrected test case for bug#21261
      
      
      mysql-test/t/view.test:
        Corrected test case for bug#21261
      mysql-test/r/view.result:
        Corrected test case for bug#21261
      mysql-test/r/ndb_condition_pushdown.result:
        Corrected test case result after fix for bug#18165
      1cbebc6e
  30. 15 Aug, 2006 2 commits
    • unknown's avatar
      Fixed bug#21261: Wrong access rights was required for an insert into a view · a23d1792
      unknown authored
      SELECT right instead of INSERT right was required for an insert into to a view.
      This wrong behaviour appeared after the fix for bug #20989. Its intention was
      to ask only SELECT right for all tables except the very first for a complex
      INSERT query. But that patch has done it in a wrong way and lead to asking 
      a wrong access right for an insert into a view.
      
      The setup_tables_and_check_access() function now accepts two want_access
      parameters. One will be used for the first table and the second for other
      tables.
      
      
      mysql-test/t/view.test:
        Added a test case for bug#21261: Wrong access rights was required for an insert into a view
      mysql-test/r/view.result:
        Added a test case for bug#21261: Wrong access rights was required for an insert into a view
      sql/sql_update.cc:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        Modified to use updated setup_tables_and_check_access() function.
      sql/sql_select.cc:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        Modified to use updated setup_tables_and_check_access() function.
      sql/sql_load.cc:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        Modified to use updated setup_tables_and_check_access() function.
      sql/sql_insert.cc:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        Modified to use updated setup_tables_and_check_access() function.
      sql/sql_delete.cc:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        Modified to use updated setup_tables_and_check_access() function.
      sql/sql_base.cc:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        The setup_tables_and_check_access() function now accepts two want_access
        parameters. One will be used for the first table and the second for other
        tables.
      sql/mysql_priv.h:
        Fixed bug#21261: Wrong access rights was required for an insert into a view
        The setup_tables_and_check_access() function now accepts two want_access
        parameters.
      a23d1792
    • unknown's avatar
      Fixed bug#15950: NOW() optimized away in VIEWs · c2ef98ad
      unknown authored
      This bug is a side-effect of bug fix #16377. NOW() is optimized in
      BETWEEN to integer constants to speed up query execution. When view is being
      created it saves already modified query and thus becomes wrong.
      
      The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
      for their results only if the current query isn't CREATE VIEW or SHOW CREATE
      VIEW.
      
      
      mysql-test/t/view.test:
        Added a test case for bug#15950: NOW() optimized away in VIEWs
      mysql-test/r/view.result:
        Added a test case for bug#15950: NOW() optimized away in VIEWs
      sql/item_cmpfunc.cc:
        Fixed bug#15950: NOW() optimized away in VIEWs
        The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
        for their results only if the current query isn't CREATE VIEW or SHOW CREATE
        VIEW.
      c2ef98ad
  31. 08 Aug, 2006 1 commit
    • unknown's avatar
      Bug#16172 DECIMAL data type processed incorrectly · 66f6b5ba
      unknown authored
      issue an 'overflow warning' if result value is bigger than max possible value
      
      
      include/decimal.h:
        Bug#16172 DECIMAL data type processed incorrectly
        new function decimal_intg()
      mysql-test/r/cast.result:
        Bug#16172 DECIMAL data type processed incorrectly
        result fix
      mysql-test/r/type_newdecimal.result:
        Bug#16172 DECIMAL data type processed incorrectly
        test result
      mysql-test/r/view.result:
        Bug#16172 DECIMAL data type processed incorrectly
        result fix
      mysql-test/t/type_newdecimal.test:
        Bug#16172 DECIMAL data type processed incorrectly
        test case
      sql/item_create.cc:
        Bug#16172 DECIMAL data type processed incorrectly
        do not increase decimal part on 2(according to manual)
      sql/my_decimal.h:
        Bug#16172 DECIMAL data type processed incorrectly
        new function my_decimal_intg()
      strings/decimal.c:
        Bug#16172 DECIMAL data type processed incorrectly
        new function decimal_intg()
      66f6b5ba