1. 19 Jul, 2005 1 commit
    • unknown's avatar
      Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch) · a32bf7fb
      unknown authored
        "Triggers have the wrong namespace"
        "Triggers: duplicate names allowed"
        "Triggers: CREATE TRIGGER does not accept fully qualified names"
        "SHOW TRIGGERS"
      
      
      mysql-test/r/information_schema.result:
        Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
      mysql-test/r/information_schema_db.result:
        INFORMATION_SCHEMA.TRIGGERS view was added.
      mysql-test/r/rpl_sp.result:
        Now DROP TRIGGER interprets first part of trigger identifier as database
        name and not as table name. Adjusted tests properly.
      mysql-test/r/trigger.result:
        Now DROP TRIGGER interprets first part of trigger identifier as database
        name and not as table name. Adjusted tests properly.
        Added test checking that triggers have database wide namespace.
        Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
        table in a different DB".
      mysql-test/r/view.result:
        Now DROP TRIGGER interprets first part of trigger identifier as database
        name and not as table name. Adjusted tests properly.
      mysql-test/t/information_schema.test:
        Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
      mysql-test/t/rpl_sp.test:
        Now DROP TRIGGER interprets first part of trigger identifier as database
        name and not as table name. Adjusted tests properly.
      mysql-test/t/trigger.test:
        Now DROP TRIGGER interprets first part of trigger identifier as database
        name and not as table name. Adjusted tests properly.
        Added test checking that triggers have database wide namespace.
        Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
        table in a different DB".
      mysql-test/t/view.test:
        Now DROP TRIGGER interprets first part of trigger identifier as database
        name and not as table name. Adjusted tests properly.
      sql/handler.cc:
        Added .TRN tho the list of known file extensions assoicated with tables.
      sql/item.h:
        trg_action_time_type/trg_event_type enums:
          Added TRG_ACTION_MAX/TRG_EVENT_MAX elements which should be used instead of
          magical values in various loops where we iterate through all types of trigger
          action times or/and trigger event types.
      sql/lex.h:
        Added new symbol "TRIGGERS".
      sql/mysql_priv.h:
        Added declaration of constant holding extension for trigger name (.TRN) files.
      sql/mysqld.cc:
        Added statistical variable for SHOW TRIGGERS command.
      sql/share/errmsg.txt:
        Added error message saying that one attempts to create trigger in wrong schema.
      sql/sp.cc:
        Replaced magical values with TRG_EVENT_MAX/TRG_ACTION_MAX constants.
      sql/sql_base.cc:
        open_unireg_entry():
          Now Table_triggers_list::check_n_load() has one more argument which
          controls whether we should prepare Table_triggers_list with fully functional
          triggers or load only their names.
      sql/sql_lex.h:
        Added element for new SHOW TRIGGERS command to enum_sql_command enum.
      sql/sql_parse.cc:
        prepare_schema_table():
          Added support for SHOW TRIGGERS statement.
      sql/sql_show.cc:
        Added new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
      sql/sql_table.cc:
        mysql_rm_table_part2():
          Replaced simple deletion of .TRG file with call to
          Table_triggers_list::drop_all_triggers which will also delete .TRN files
          for all triggers associated with table.
      sql/sql_trigger.cc:
        Now triggers have database wide namespace. To support it we create special .TRN
        file with same name as trigger for each trigger. This file contains name of
        trigger's table so one does not need to specify it explicitly in DROP TRIGGER.
        Moreover DROP TRIGGER treats first part of trigger identifier as database name
        now. Updated mysql_create_or_drop_trigger() routine and
        Table_triggers_list::create_trigger()/drop_trigger()/check_n_load() methods
        accordingly. Added add_table_for_trigger() routine and
        Table_triggers_list::drop_all_triggers() method.
        
        Added Table_triggers_list::get_trigger_info() for obtaining trigger metadata.
      sql/sql_trigger.h:
        Table_triggers_list:
          Use TRG_EVENT_MAX, TRG_ACTION_MAX instead of magic values.
          Added get_trigger_info() method for obtaining trigger's meta-data.
          Added drop_all_triggers() method which drops all triggers for table.
          Added declarations of trg_action_time_type_names/trg_event_type_names
          arrays which hold names of triggers action time types  and event types.
      sql/sql_yacc.yy:
        Changed grammar for CREATE/DROP TRIGGER to support database wide trigger
        namespace. Added new SHOW TRIGGERS statement.
      sql/table.h:
        enum enum_schema_tables:
          Added constant for new INFORMATION_SCHEMA.TRIGGERS view.
      a32bf7fb
  2. 17 Jul, 2005 1 commit
    • unknown's avatar
      func_in.result, func_in.test: · e155a0c0
      unknown authored
        Fixed bug #11885.
      sql_select.cc:
        Fixed bug #11885.
        Predicates of the forms 'a IN (v)' 'a NOT IN (v)' now
        is replaced by 'a=v' and 'a<>v' at the parsing stage.
      sql_yacc.yy:
        Fixed bug #11885.
        Predicates of the forms 'a IN (v)' 'a NOT IN (v)' now 
        is replaced by 'a=v' and 'a<>v' at the parsing stage.
      
      
      sql/sql_yacc.yy:
        Fixed bug #11885.
        Predicates of the forms 'a IN (v)' 'a NOT IN (v) now 
        is replaced by 'a=v' and 'a<>v' at the parsing stage.
      sql/sql_select.cc:
        Fixed bug #11885.
        Predicates of the forms 'a IN (v)' 'a NOT IN (v) now
        is replaced by 'a=v' and 'a<>v' at the parsing stage.
      mysql-test/t/func_in.test:
        Fixed bug #11885.
      mysql-test/r/func_in.result:
        Fixed bug #11885.
      e155a0c0
  3. 16 Jul, 2005 9 commits
    • unknown's avatar
      opt_range.cc: · e2bd7401
      unknown authored
        Fixed bug #11853.
        Corrected the code of the range optimization for
        NOT IN and NOT BETWEEN.
      range.test, range.result:
        Fixed bug #11853.
      
      
      mysql-test/t/range.test:
        Fixed bug #11853.
      sql/opt_range.cc:
        Fixed bug #11853.
        Corrected the code of the range optimization for
        NOT IN and NOT BETWEEN.
      e2bd7401
    • unknown's avatar
      After-merge fixes (4.1 -> 5.0). · 7bdc4dd0
      unknown authored
      
      mysql-test/r/sp.result:
        Test results fixed: rewritten test for Bug#6129
      mysql-test/r/view.result:
        Push a change to the result file from Sanja's patch.
      mysql-test/t/sp.test:
        Rewrite the test for Bug#6129 (now that stored procedures don't
        evaluate system variables at parse, the test produced different results).
        The old test failed with 1 in the second invocation (the old
        result was wrong).
      sql/item_func.cc:
        After-merge fix.
      sql/item_func.h:
        After-merge fix.
      sql/mysql_priv.h:
        After-merge fix.
      sql/mysqld.cc:
        Rollback the patch for Bug#7403 (it breaks the test suite).
      7bdc4dd0
    • unknown's avatar
      Merge mysql.com:/opt/local/work/mysql-4.1-root · 40efb362
      unknown authored
      into  mysql.com:/media/sda1/mysql/mysql-5.0-merge
      
      
      mysql-test/r/select.result:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/ps.result:
        Manual merge (again).
      mysql-test/t/ps.test:
        Manual merge (again).
      mysql-test/t/select.test:
        Manual merge (again).
      sql/item_func.cc:
        Manual merge (again).
      sql/item_func.h:
        Manual merge (again).
      sql/set_var.h:
        Manual merge (again).
      40efb362
    • unknown's avatar
      cs fixes · 0789b177
      unknown authored
      0789b177
    • unknown's avatar
      Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0 · 757ad317
      unknown authored
      into lmy002.wdf.sap.corp:/home/georg/work/mysql-5.0
      
      
      tests/mysql_client_test.c:
        Auto merged
      757ad317
    • unknown's avatar
      Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0 · 58f67c6d
      unknown authored
      into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
      
      
      58f67c6d
    • unknown's avatar
      Restore previous used client charset in mysql_reconnect · 90002cdc
      unknown authored
      Moved mysql_set_character_set function to client.c
      Changed function prototype for mysql_set_character_set (as suggested
      by Konstantin)
      
      
      include/mysql.h:
        Changed function prototype
      libmysql/libmysql.c:
        moved mysql_set_character_set to client.c
      sql-common/client.c:
        moved mysql_set_character_set to client.c
      90002cdc
    • unknown's avatar
      Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 · 2f4fd88a
      unknown authored
      into  zim.(none):/home/brian/mysql/foo-5.0
      
      
      2f4fd88a
    • unknown's avatar
      Added federated to max base test. · 48995b9a
      unknown authored
      
      BUILD/SETUP.sh:
        Added federated to base_max tests.
      48995b9a
  4. 15 Jul, 2005 29 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · d5b80a78
      unknown authored
      into  mysql.com:/opt/local/work/mysql-4.1-root
      
      
      d5b80a78
    • unknown's avatar
      Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1 · e81337d8
      unknown authored
      into  linux.site:/home/reggie/bk/bug7403
      
      
      e81337d8
    • unknown's avatar
      A fix and a test case for Bug#9359 "Prepared statements take snapshot · e83e1053
      unknown authored
       of system vars at PREPARE time": implement a special Item
      to handle system variables. This item substitutes itself with 
      a basic constant containing variable value at fix_fields.
      
      
      mysql-test/r/ps.result:
        - test results fixed (Bug#9359).
      mysql-test/t/ps.test:
        - add a test case for Bug#9359 "Prepared statements take snapshot
         of system vars at PREPARE time"
      sql/item_func.cc:
        - implement Item_func_get_system_var: we should not evaluate system
        variables in the parser, but instead should create an item which 
        is evaluated to a constant at execute.
        - remove an unused function
      sql/item_func.h:
        Add a new item, Item_func_get_system_var
      sql/mysql_priv.h:
        Move necessary declarations to make set_var.h objects visible in 
        item_func.h
      sql/set_var.cc:
        - we should not print to network from get_system_var: if it's called
        from prepared statement prepare, we get packets out of order when using
        the binary protocol. Instead report the error to be sent to the user later.
        This is a backport from 5.0.
      sql/set_var.h:
        - declaration of enum_var_type moved to mysql_priv.h
      e83e1053
    • unknown's avatar
      Fix bug#11482 4.1.12 produces different resultset for a complex query · 0f41fb42
      unknown authored
        than in previous 4.1.x
      
      Wrongly applied optimization were adding NOT NULL constraint which results in
      rejecting valid rows and reduced result set.
      
      The problem was that add_notnull_conds() while checking subquery were adding
      NOT NULL constraint to left joined table, to which, normally, optimization 
      don't have to be applied.
      
      
      sql/sql_select.cc:
        Fix bug #11482 Wrongly applied optimization was erroneously rejecting valid rows
        Constraint were added to optimization appliance test.
      mysql-test/t/select.test:
        Test case for bug #11482  Wrongly applied optimization was erroneously rejecting valid rows
      mysql-test/r/select.result:
        Test case for bug #11482  Wrongly applied optimization was erroneously rejecting valid rows
      0f41fb42
    • unknown's avatar
    • unknown's avatar
      Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0 · 213c0540
      unknown authored
      into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
      
      
      BitKeeper/etc/config:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/r/sp-security.result:
        merge
      mysql-test/r/view.result:
        merge
      mysql-test/t/sp-security.test:
        merge
      mysql-test/t/view.test:
        merge
      sql/item_cmpfunc.cc:
        merge
      sql/sql_class.h:
        merge
      213c0540
    • unknown's avatar
      stop evaluation constant functions in WHERE (BUG#4663) · e84229b0
      unknown authored
      correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)
      
      
      BitKeeper/etc/config:
        switch off open logging
      mysql-test/r/sp-security.result:
        correct value from current_user() in function run from "security definer"
      mysql-test/r/view.result:
        evaluation constant functions in WHERE (BUG#4663)
      mysql-test/t/sp-security.test:
        correct value from current_user() in function run from "security definer"
      mysql-test/t/view.test:
        evaluation constant functions in WHERE (BUG#4663)
      sql/item.cc:
        Item_static_string_func creation if it is need
      sql/item.h:
        support of Item_static_string_func creation
      sql/item_cmpfunc.cc:
        do not evaluate items during view creation
      sql/item_create.cc:
        create Item_func_user
      sql/item_strfunc.cc:
        Item_func_sysconst in case of converting value still have to correctly print itself
        => use Item_static_string_func instead of Item_string
            Item_func_user return USER() or CURRENT_USER()
      sql/item_strfunc.h:
        support of correct charset conversion procedure in Item_func_sysconst
      sql/sql_class.h:
        new method
      sql/sql_yacc.yy:
        Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
      e84229b0
    • unknown's avatar
      Merge linux.site:/home/reggie/bk/bug7403 · d49ddbd7
      unknown authored
      into  linux.site:/home/reggie/bk/mysql-5.0
      
      
      sql/mysqld.cc:
        merging in changes from 4.1
      d49ddbd7
    • unknown's avatar
      Removed dead options, fixed pentium script to no longer ask for isam (its not included in 5.0). · ba52e741
      unknown authored
      
      BUILD/SETUP.sh:
        Removed dead options, added blackhole option
      BUILD/compile-pentium-debug-max-no-embedded:
        Updated option to remove unused option
      ba52e741
    • unknown's avatar
      Post-review fix: Made test bug9538 test robust. · 51308e23
      unknown authored
      
      mysql-test/r/sp.result:
        Made test bug9538 test robust.
      mysql-test/t/sp.test:
        Made test bug9538 test robust.
      51308e23
    • unknown's avatar
      Merge mysql.com:/usr/local/bk/mysql-5.0 · 5bbb1a69
      unknown authored
      into  mysql.com:/home/pem/work/mysql-5.0
      
      
      5bbb1a69
    • unknown's avatar
      b5d9a764
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 3a92d85a
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
      
      
      tests/mysql_client_test.c:
        Auto merged
      3a92d85a
    • unknown's avatar
      Fixed BUG#9538: SProc: Creation fails if we try to SET system variable · 6f619804
      unknown authored
                        using @@var_name in proc
        Made sure we don't lose the tokenizer state when swapping lex in during SET
        parsing.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#9538.
      mysql-test/t/sp.test:
        New test case for BUG#9538.
      sql/sp_head.cc:
        Keep lex->next_state when swapping lex during SP parsing (for SET mainly),
        otherwise the tokenizer gets confused.
      6f619804
    • unknown's avatar
      Made .c files compile with a C compiler. · c5d4befb
      unknown authored
      
      ndb/src/common/portlib/NdbMutex.c:
        Turned into C code.
      ndb/src/common/portlib/NdbThread.c:
        Turned into C code.
      c5d4befb
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 9e1cf0e2
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
      
      
      tests/mysql_client_test.c:
        Auto merged
      9e1cf0e2
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · f9e9cd93
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
      
      
      f9e9cd93
    • unknown's avatar
      minor fix for restoring the previous characterset in · e54cc5b9
      unknown authored
      test_client_character_set
      
      
      tests/mysql_client_test.c:
        minor fix for restoring the previous characterset.
      e54cc5b9
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 435846b8
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
      
      
      435846b8
    • unknown's avatar
      Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0 · d4c6b820
      unknown authored
      into lmy002.wdf.sap.corp:/home/georg/work/mysql-5.0
      
      
      d4c6b820
    • unknown's avatar
      Fix for bug #11037. · 6fcb9c8e
      unknown authored
      When all rows are fetched subsequent calls to mysql_stmt_fetch return
      now MYSQL_NO_DATA instead of errorcode 1.
      
      
      libmysql/libmysql.c:
        fix for bug#11037
      tests/mysql_client_test.c:
        added new testcase for bug #11037
      6fcb9c8e
    • unknown's avatar
      Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1 · 0589559e
      unknown authored
      into  linux.site:/home/reggie/bk/bug7403
      
      
      0589559e
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1 · dba31904
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new
      
      
      tests/mysql_client_test.c:
        Auto merged
      dba31904
    • unknown's avatar
      Merge · 51229d4b
      unknown authored
      
      mysql-test/t/ctype_utf8.test:
        Auto merged
      ndb/src/common/mgmcommon/ConfigRetriever.cpp:
        Auto merged
      ndb/src/common/transporter/Transporter.hpp:
        Auto merged
      ndb/src/common/transporter/TransporterRegistry.cpp:
        Auto merged
      ndb/src/mgmclient/CommandInterpreter.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.hpp:
        Auto merged
      ndb/src/mgmsrv/Services.cpp:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      support-files/mysql.spec.sh:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      ndb/include/transporter/TransporterRegistry.hpp:
        SCCS merged
      ndb/src/common/transporter/Transporter.cpp:
        SCCS merged
      51229d4b
    • unknown's avatar
      minor type fixes to prev patch · dbbd54e5
      unknown authored
      dbbd54e5
    • unknown's avatar
      Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-release · 2a48132e
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new
      
      
      mysql-test/t/ctype_utf8.test:
        Auto merged
      ndb/src/common/mgmcommon/ConfigRetriever.cpp:
        Auto merged
      ndb/src/common/transporter/TransporterRegistry.cpp:
        Auto merged
      ndb/src/mgmclient/CommandInterpreter.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.hpp:
        Auto merged
      ndb/src/mgmsrv/Services.cpp:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      2a48132e
    • unknown's avatar
      Merge mysqldev@production.mysql.com:my/mysql-4.1-release · 130cd50d
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-release
      
      
      130cd50d
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 5549ed09
      unknown authored
      into  mysql.com:/usr/home/ram/work/mysql-5.0
      
      
      5549ed09
    • unknown's avatar
      NO_DEFAULT_VALUE_FLAG and BLOB_FLAG combined · 0ec715a6
      unknown authored
      0ec715a6