An error occurred fetching the project authors.
  1. 03 Sep, 2004 1 commit
    • unknown's avatar
      CHECK OPTIONs added (WL#1983) · 704fb6da
      unknown authored
      include/mysqld_error.h:
        new error messages
      mysql-test/r/view.result:
        test of CHECK OPTION in a views
      mysql-test/t/view.test:
        test of CHECK OPTION in a views
      sql/share/czech/errmsg.txt:
        new error messages
      sql/share/danish/errmsg.txt:
        new error messages
      sql/share/dutch/errmsg.txt:
        new error messages
      sql/share/english/errmsg.txt:
        new error messages
      sql/share/estonian/errmsg.txt:
        new error messages
      sql/share/french/errmsg.txt:
        new error messages
      sql/share/german/errmsg.txt:
        new error messages
      sql/share/greek/errmsg.txt:
        new error messages
      sql/share/hungarian/errmsg.txt:
        new error messages
      sql/share/italian/errmsg.txt:
        new error messages
      sql/share/japanese/errmsg.txt:
        new error messages
      sql/share/korean/errmsg.txt:
        new error messages
      sql/share/norwegian-ny/errmsg.txt:
        new error messages
      sql/share/norwegian/errmsg.txt:
        new error messages
      sql/share/polish/errmsg.txt:
        new error messages
      sql/share/portuguese/errmsg.txt:
        new error messages
      sql/share/romanian/errmsg.txt:
        new error messages
      sql/share/russian/errmsg.txt:
        new error messages
      sql/share/serbian/errmsg.txt:
        new error messages
      sql/share/slovak/errmsg.txt:
        new error messages
      sql/share/spanish/errmsg.txt:
        new error messages
      sql/share/swedish/errmsg.txt:
        new error messages
      sql/share/ukrainian/errmsg.txt:
        new error messages
      sql/sql_insert.cc:
        CHECK OPTIONs added
      sql/sql_lex.h:
        CHECK OPTIONs added
      sql/sql_update.cc:
        CHECK OPTIONs added
      sql/sql_view.cc:
        new parameter added
        returnrd values fixed
      sql/sql_yacc.yy:
        CHECK OPTIONs added
      sql/table.cc:
        CHECK OPTIONs added
      sql/table.h:
        CHECK OPTIONs added
      704fb6da
  2. 01 Sep, 2004 1 commit
    • unknown's avatar
      adding mysql.proc to table list if view contains stored procedures (BUG#5151) · c3389776
      unknown authored
      mysql-test/r/view.result:
        fixed test
        VIEW over droped function
      mysql-test/t/view.test:
        VIEW over droped function
      sql/item_func.cc:
        after review fix
      sql/sp.cc:
        hint to find mysql.proc
      sql/sql_lex.h:
        hint to find mysql.proc
      sql/sql_parse.cc:
        hint to find mysql.proc
      sql/sql_view.cc:
        adding mysql.proc to table list if view contains stored procedures
      c3389776
  3. 24 Aug, 2004 1 commit
    • unknown's avatar
      new method to detect commands where all VIEWs should be temporary tables (BUG#4803) · b8785595
      unknown authored
      mysql-test/r/view.result:
        Showing VIEW with VIEWs in subquery
      mysql-test/t/view.test:
        Showing VIEW with VIEWs in subquery
      sql/sql_lex.cc:
        new method to detect commands where all VIEWs should be temporary tables
      sql/sql_lex.h:
        new method to detect commands where all VIEWs should be temporary tables
      sql/sql_view.cc:
        new method to detect commands where all VIEWs should be temporary tables
        debug output added
      b8785595
  4. 23 Jul, 2004 1 commit
    • unknown's avatar
      fixed using VIEW fields (BUG#4617) · 1b98202b
      unknown authored
      mysql-test/r/view.result:
        using VIEW fields several times in query resolved via temporary tables
      mysql-test/t/view.test:
        using VIEW fields several times in query resolved via temporary tables
      sql/item.h:
        fixed using of result_field by Item_ref
      sql/sql_base.cc:
        Create Item_ref as reference on VIEW fields expression reference
      sql/sql_insert.cc:
        privent creating Item_ref in insert list (where Item_fields should be)
      sql/sql_lex.cc:
        Item_ref creation control
      sql/sql_lex.h:
        Item_ref creation control
      sql/sql_update.cc:
        privent creating Item_ref in insert list (where Item_fields should be) and creation Item_fields for UPDATE list
      sql/table.cc:
        Do not create Item_ref for internal view of view processing
      1b98202b
  5. 21 Jul, 2004 1 commit
  6. 16 Jul, 2004 1 commit
    • unknown's avatar
      memory leak removing · a9908e5c
      unknown authored
      BitKeeper/etc/ignore:
        Added libmysqld/sql_view.cc to the ignore list
      a9908e5c
  7. 15 Jul, 2004 1 commit
    • unknown's avatar
      VIEW · 8790b1e6
      unknown authored
      two TABLE_LIST copy eliminated
      
      
      include/mysqld_error.h:
        errors of view
      libmysqld/Makefile.am:
        new view file
      mysql-test/r/connect.result:
        SHOW TABLE show type of table
      mysql-test/r/ctype_recoding.result:
        SHOW TABLE show type of table
      mysql-test/r/drop.result:
        SHOW TABLE show type of table
      mysql-test/r/grant.result:
        new two privileges (CRETEA|SHOW VIEW)
      mysql-test/r/lowercase_table.result:
        SHOW TABLE show type of table
      mysql-test/r/ps_1general.result:
        SHOW TABLE show type of table
      mysql-test/r/rename.result:
        SHOW TABLE show type of table
      mysql-test/r/rpl000009.result:
        SHOW TABLE show type of table
      mysql-test/r/rpl_error_ignored_table.result:
        SHOW TABLE show type of table
      mysql-test/r/select.result:
        SHOW TABLE show type of table
      mysql-test/r/system_mysql_db.result:
        SHOW TABLE show type of table
        new two privileges (CRETEA|SHOW VIEW)
      mysql-test/t/system_mysql_db_fix.test:
        removing all system tables
      scripts/mysql_fix_privilege_tables.sql:
        new two privileges (CRETEA|SHOW VIEW)
      sql/Makefile.am:
        new VIEW related file
      sql/ha_myisammrg.cc:
        two TABLE_LIST copy eliminated
      sql/item.cc:
        VIEW
      sql/item.h:
        VIEW
      sql/item_subselect.cc:
        VIEW
      sql/item_subselect.h:
        VIEW
      sql/lex.h:
        VIEW
      sql/lock.cc:
        VIEW
      sql/mysql_priv.h:
        VIEW
      sql/mysqld.cc:
        VIEW
        new parameter - sql_updatable_view_key
      sql/opt_sum.cc:
        two TABLE_LIST copy eliminated
      sql/set_var.cc:
        new parameter - sql_updatable_view_key
      sql/share/czech/errmsg.txt:
        errors messages of views
      sql/share/danish/errmsg.txt:
        errors messages of views
      sql/share/dutch/errmsg.txt:
        errors messages of views
      sql/share/english/errmsg.txt:
        errors messages of views
      sql/share/estonian/errmsg.txt:
        errors messages of views
      sql/share/french/errmsg.txt:
        errors messages of views
      sql/share/german/errmsg.txt:
        errors messages of views
      sql/share/greek/errmsg.txt:
        errors messages of views
      sql/share/hungarian/errmsg.txt:
        errors messages of views
      sql/share/italian/errmsg.txt:
        errors messages of views
      sql/share/japanese/errmsg.txt:
        errors messages of views
      sql/share/korean/errmsg.txt:
        errors messages of views
      sql/share/norwegian-ny/errmsg.txt:
        errors messages of views
      sql/share/norwegian/errmsg.txt:
        errors messages of views
      sql/share/polish/errmsg.txt:
        errors messages of views
      sql/share/portuguese/errmsg.txt:
        errors messages of views
      sql/share/romanian/errmsg.txt:
        errors messages of views
      sql/share/russian/errmsg.txt:
        errors messages of views
      sql/share/serbian/errmsg.txt:
        errors messages of views
      sql/share/slovak/errmsg.txt:
        errors messages of views
      sql/share/spanish/errmsg.txt:
        errors messages of views
      sql/share/swedish/errmsg.txt:
        errors messages of views
      sql/share/ukrainian/errmsg.txt:
        errors messages of views
      sql/slave.cc:
        two TABLE_LIST copy eliminated
      sql/sp.cc:
        VIEW
      sql/sql_acl.cc:
        VIEW
      sql/sql_acl.h:
        VIEW
      sql/sql_base.cc:
        VIEW
      sql/sql_cache.cc:
        two TABLE_LIST copy eliminated
      sql/sql_class.h:
        VIEW
      sql/sql_db.cc:
        two TABLE_LIST copy eliminated
      sql/sql_delete.cc:
        VIEW
      sql/sql_derived.cc:
        VIEW
      sql/sql_handler.cc:
        two TABLE_LIST copy eliminated
      sql/sql_help.cc:
        two TABLE_LIST copy eliminated
      sql/sql_insert.cc:
        VIEW
      sql/sql_lex.cc:
        VIEW
      sql/sql_lex.h:
        VIEW
      sql/sql_load.cc:
        VIEW
      sql/sql_olap.cc:
        VIEW
      sql/sql_parse.cc:
        two TABLE_LIST copy eliminated
        VIEW
      sql/sql_prepare.cc:
        VIEW
      sql/sql_rename.cc:
        two TABLE_LIST copy eliminated
      sql/sql_select.cc:
        VIEW
      sql/sql_show.cc:
        VIEW
      sql/sql_table.cc:
        VIEW
      sql/sql_union.cc:
        VIEW
      sql/sql_update.cc:
        VIEW
      sql/sql_yacc.yy:
        VIEW
      sql/table.cc:
        VIEW
      sql/table.h:
        VIEW
      sql/tztime.cc:
        two TABLE_LIST copy eliminated
      sql/unireg.h:
        VIEW
      tests/client_test.c:
        VIEW
      8790b1e6
  8. 01 Jul, 2004 1 commit
    • unknown's avatar
      fixed join_nested test independence of environment · 148eecbd
      unknown authored
      spaces at line end in fresh definitions removed
      fixed printing of nested joins (BUG#4352)
      
      
      mysql-test/r/join_nested.result:
        fixed join_nested test independence of environment
        print of nested join test added
      mysql-test/t/join_nested.test:
        fixed join_nested test independence of environment
        print of nested join test added
      sql/sql_lex.h:
        space at line end in fresh definition removed
      sql/sql_select.cc:
        fixed printing of nested joins
      sql/table.h:
        spaces at line end in fresh definitions removed
        method for table printing
      148eecbd
  9. 30 Jun, 2004 1 commit
    • unknown's avatar
      subselect2.result, select.result: · defef7ee
      unknown authored
        Post-merge fixes for nested joins.
        The join_tab_cmp function in sql_select has been changed.
      join_nested.result:
        Post-merge fixes for nested joins. 
        The join_tab_cmp function in sql_select has been changed
      sql_select.cc:
        Post-merge fixes for nested joins.
        Avoided re-execution of eliminate_not_funcs and simplify_joins
        in optimize_cond.
        Changed the join_tab_cmp function to take into account
        the dependent relation.
      sql_lex.cc, sql_lex.h:
        Added the first_cond_optimization flag to st_select_lex to avoid
        re-execution of some optimizations in optimize_cond.
      sql_base.cc:
        Post-merge fixes for nested joins. 
        Fixed problems with a proper column list substituted for '*' in
        queries with natural joins.
      
      
      sql/sql_base.cc:
        Post-merge fixes for nested joins. 
        Fixed problems with a proper column list substituted for '*' in
        queries with natural joins.
      sql/sql_lex.h:
        Added the first_cond_optimization flag to st_select_lex to avoid
        re-execution of some optimizations in optimize_cond.
      sql/sql_lex.cc:
        Added the first_cond_optimization flag to st_select_lex to avoid
        re-execution of some optimizations in optimize_cond.
      sql/sql_select.cc:
        Post-merge fixes for nested joins.
        Avoided re-execution of eliminate_not_funcs and simplify_joins
        in optimize_cond.
        Changed the join_tab_cmp function to take into account
        the dependent relation.
      mysql-test/r/join_nested.result:
        Post-merge fixes for nested joins. 
        The join_tab_cmp function in sql_select has been changed
      mysql-test/r/select.result:
        Post-merge fixes for nested joins.
        The join_tab_cmp function in sql_select has been changed.
      mysql-test/r/subselect2.result:
        Post-merge fixes for nested joins.
        The join_tab_cmp function in sql_select has been changed.
      defef7ee
  10. 21 Jun, 2004 1 commit
  11. 11 Jun, 2004 1 commit
    • unknown's avatar
      join_nested.test, join_nested.result: · cd23d6e3
      unknown authored
        new file
      Many files:
        Nested joins added.
      
      
      sql/item_cmpfunc.h:
        Nested joins added.
      sql/item_func.h:
        Nested joins added.
      sql/sql_base.cc:
        Nested joins added.
      sql/sql_lex.cc:
        Nested joins added.
      sql/sql_lex.h:
        Nested joins added.
      sql/sql_parse.cc:
        Nested joins added.
      sql/sql_select.cc:
        Nested joins added.
      sql/sql_select.h:
        Nested joins added.
      sql/sql_yacc.yy:
        Nested joins added.
      sql/table.h:
        Nested joins added.
      mysql-test/r/join_outer.result:
        Nested joins added.
      mysql-test/r/select.result:
        Nested joins added.
      cd23d6e3
  12. 09 Jun, 2004 1 commit
    • unknown's avatar
      do not unlock tables early if we have subquery in HAVING clause (BUG#3984) · 07b5fdbc
      unknown authored
      mysql-test/r/subselect_innodb.result:
        test of unlocking innodb tables and subquery in HAVING clause
      mysql-test/t/subselect_innodb.test:
        test of unlocking innodb tables and subquery in HAVING clause
      sql/item_subselect.cc:
        mark SELECT with subquery in HAVING clause
      sql/sql_lex.cc:
        mark SELECT with subquery in HAVING clause
      sql/sql_lex.h:
        mark SELECT with subquery in HAVING clause
      sql/sql_select.cc:
        do not unlock tables early if we have subquery in HAVING clause
      07b5fdbc
  13. 03 Jun, 2004 1 commit
    • unknown's avatar
      Implementation of WL#1824 "Add replication of character set variables in 4.1", · 934bb37d
      unknown authored
      by binlogging some SET ONE_SHOT CHARACTER_SETetc,
      which will be enough until we have it more compact and more complete in 5.0. With the present patch,
      replication will work ok between 4.1.3 master and slaves, as long as:
      - master and slave have the same GLOBAL.COLLATION_SERVER
      - COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used
      - application does not use the fact that table is created with charset of the USEd db (BUG#2326).
      all of which are not too hard to fulfill. 
      ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets,
      so we give error if used for non-charset vars.
      Fix for BUG#3875 "mysqlbinlog produces wrong ouput  if query uses
       variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated
       properly after SET NAMES".
      Detecting that master and slave have different global charsets or server ids.
      
      
      mysql-test/r/rpl_server_id1.result:
        it's normal to not run as I have added a test to compare server ids of master and slave
        at startup and stop if equal (unless --replicate-same-server-id)
      mysql-test/r/rpl_user_variables.result:
        result update (as we now print charset of user var).
      mysql-test/r/user_var.result:
        result update
      mysql-test/t/rpl_server_id1.test:
        no need to select as slave is not running
      mysql-test/t/user_var.test:
        testing if the content of user vars is escaped when mysqlbinlog prints them,
        and if the name is backquoted.
      sql/lex.h:
        new keyword ONE_SHOT
      sql/log.cc:
        when writing to the binlog, before writing the actual statement, write some SET ONE_SHOT CHARACTER_SET_CLIENT etc
        for the slave to know the charset variables (which are important as they affect the inserted data).
      sql/log_event.cc:
        print charset and collation of user var in mysqlbinlog and SHOW BINLOG EVENTS.
        escape the content of the var. Backquote its name.
        Will ask Bar to check that using my_charset_bin for escaping is ok.
      sql/set_var.cc:
        understand SET CHARACTER_SET_CLIENT=10 (don't require a string, accept a number).
        Refuse changing of GLOBAL CHARACTER_SET_SERVER/COLLATION_SERVER if binlog or slave,
        as it will make the master or slave make wrong assumptions.
        A function to catch SET ONE_SHOT on non-charset variables (which is forbidden)
      sql/set_var.h:
        no_support_one_shot to know if the var supports ONE_SHOT (only charset vars do, soon timezones).
        Accept int arg in SET CHARACTER_SET_etc
      sql/slave.cc:
        when I/O slave thread starts, verify that master's and slave charsets match.
        And by the way verify that server ids are different.
        Don't fail if UNIX_TIMESTAMP() can't be done on master (very old master), that's
        not fatal.
      sql/sql_class.cc:
        one_shot
      sql/sql_class.h:
        one_shot
      sql/sql_lex.h:
        one_shot
      sql/sql_parse.cc:
        when SET ONE_SHOT is used, verify that it's only used for charset/collation vars;
        otherwise refuse.
      sql/sql_yacc.yy:
        ONE_SHOT keyword in SET
      934bb37d
  14. 24 May, 2004 1 commit
    • unknown's avatar
      Fix for bug which caused temp_table.test fail on Darwin 7.3 · 0bf85cfd
      unknown authored
      The code in mysql_create_table() code assumes that if lower_case_names==2 then table alias 
      should contain unchanged table name, and this was not true for temporary tables which
      had 'tmp-table' constant as alias. Now we are using table name as alias for such tables.
      
      
      sql/sql_lex.cc:
        Removed tmp_table_alias constant which is no longer used.
      sql/sql_lex.h:
        Removed tmp_table_alias constant which is no longer used.
      sql/sql_yacc.yy:
        Let us use table name instead of 'tmp-table' as alias for table being created by 
        CREATE TEMPORARY TABLE statement. This fixes failing temp_table.test on Darwin 7.3 
        since mysql_create_table() code assumes that if lower_case_names==2 then table alias 
        should contain unchanged table name (and now this assumtion is true but it were false
        for temporary tables before...).
      0bf85cfd
  15. 21 May, 2004 2 commits
    • unknown's avatar
      Introduced parameter object "ALTER_INFO" for mysql_alter_table · ea63df7f
      unknown authored
      to make list of parameters in mysql_alter_table shorted
      to avoid warning in MSVC (windows) building 
      
      
      sql/mysql_priv.h:
        Introduced parameter object "ALTER_INFO" for mysql_alter_table
        - changed declaration of mysql_alter_table
        - changed declaration of mysql_drop_index 
          (replaced List<Alter_drop> by ALTER_INFO)
      sql/sql_lex.h:
        Introduced parameter object "ALTER_INFO" for mysql_alter_table
        - declared struct ALTER_INFO
        - added ALTER_INFO alter_info; into LEX
        - removed fields which were added into ALTER_INFO from LEX
      sql/sql_parse.cc:
        Introduced parameter object "ALTER_INFO" for mysql_alter_table
        - changed invotaions of mysql_alter_table
        - replaced cleaning fields in SQLCOM_OPTIMIZE by ALTER_INFO::reset
        - changed invocation of mysql_drop_index (replaced lex->drop_list by &lex->alter_info)
        - changed definition of mysql_create_index and mysql_drop_index to use ALTER_INFO
      sql/sql_table.cc:
        Introduced parameter object "ALTER_INFO" for mysql_alter_table
        - changed definition of mysql_alter_table
      sql/sql_yacc.yy:
        Introduced parameter object "ALTER_INFO" for mysql_alter_table
        - replaced using of removed from LEX fields my fields of LEX::alter_info
      ea63df7f
    • unknown's avatar
      WL#1622 "SQL Syntax for Prepared Statements": Post-review fixes (1 of 2) · e7710af7
      unknown authored
      mysql-test/r/ps.result:
        Added tests for PREPARE stmt1 FROM @var syntax
      mysql-test/t/ps.test:
        Added tests for PREPARE stmt1 FROM @var syntax
      mysys/my_error.c:
        Added support for "%.*s" format
      sql/item.cc:
        Removed one redundant Item_param::set_value function
      sql/item.h:
        Removed one redundant Item_param::set_value function
      sql/mysqld.cc:
        Reformmated the code
      sql/share/czech/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/dutch/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/english/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/estonian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/french/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/german/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/greek/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/hungarian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/italian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/japanese/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/korean/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/norwegian-ny/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/norwegian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/polish/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/portuguese/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/romanian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/russian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/slovak/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/spanish/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/swedish/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/ukrainian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/sql_class.h:
        SQL Prepared statements now can't be used by binary protocol commands
      sql/sql_lex.h:
        Added support for PREPARE stmt1 FROM @var syntax.
      sql/sql_parse.cc:
        Added support for PREPARE stmt1 FROM @var syntax.
      sql/sql_prepare.cc:
        Code cleanup
      sql/sql_yacc.yy:
        Added support for PREPARE stmt1 FROM @var syntax.
      e7710af7
  16. 19 May, 2004 2 commits
    • unknown's avatar
      PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266) · 16227c28
      unknown authored
      mysql-test/r/sp.result:
        test suite for Bug #2266
      mysql-test/t/sp.test:
        test suite for Bug #2266
      sql/item_subselect.cc:
        made ancestor for Statement (Item_arena)
      sql/item_subselect.h:
        made ancestor for Statement (Item_arena)
      sql/item_sum.cc:
        made ancestor for Statement (Item_arena)
      sql/item_sum.h:
        made ancestor for Statement (Item_arena)
      sql/mysql_priv.h:
        reset_stmt_for_execute use PS and SP
      sql/sp_head.cc:
        sp_head use Item_arena as ancestor to be PS cleunup compatible
        SP use PS storing/restoring/cleanup mechanisms
        cleanup() of SP Items added
        Items created in temporary memory pool during SP execution saved for normal freeing after SP execution
      sql/sp_head.h:
        sp_head use Item_arena
      sql/sql_base.cc:
        made ancestor for Statement (Item_arena)
        results of wild_setup made permanent
        setup_conds make natural joins expanding only once and store results in PS/SP memory
      sql/sql_class.cc:
        made ancestor for Statement (Item_arena)
      sql/sql_class.h:
        made ancestor for Statement (Item_arena)
        method to detect PS preparation added
      sql/sql_delete.cc:
        storing where for DELETE and mark first execution
      sql/sql_derived.cc:
        use method
      sql/sql_insert.cc:
        mark first execution for INSERT
      sql/sql_lex.cc:
        flags to correctly make transformations of query and storing them in memory of PS/SP
        made ancestor for Statement (Item_arena)
      sql/sql_lex.h:
        reved variable od SP ol saving data
        flags to correctly make transformations of query and storing them in memory of PS/SP
      sql/sql_parse.cc:
        cleunup unit for any query
      sql/sql_prepare.cc:
        made ancestor for Statement (Item_arena)
        storing where moved to preparation
        changed interface of reset_stmt_for_execute to use it is SP
        do not restore where/order by/group by before first execution (but tables and unit can be chenged without execution and should be prepared (subqueries executes on demand))
      sql/sql_select.cc:
        storing where for SELECT/multi-DELETE/... and mark first execution
      sql/sql_union.cc:
        made ancestor for Statement (Item_arena)
      sql/sql_update.cc:
        storing where for UPDATE and mark first execution
      16227c28
    • unknown's avatar
      after review changes · 9fb55cef
      unknown authored
      mysql-test/r/derived.result:
        explain of hidden subselect changed according to review
      mysql-test/r/subselect.result:
        explain of hidden subselect changed according to review
      mysql-test/r/union.result:
        explain of hidden subselect changed according to review
      sql/sql_class.h:
        we bo not need sign for now
      sql/sql_lex.h:
        we do not need sign for now
      9fb55cef
  17. 07 May, 2004 1 commit
    • unknown's avatar
      keep old engine & JOIN if we changed subquery Item (Bug #3646) · e54ca13b
      unknown authored
      mysql-test/r/subselect.result:
        ALL/ANY test
      mysql-test/t/subselect.test:
        ALL/ANY test
      sql/item_subselect.cc:
        keep old engine & JOIN if we changed subquery Item, which allow avoid second all SELECT items fix_fields call with pervios clean up (because of second setup_tables which remove table->key_use and maybe something else)
        keep list when we change Item in SELECT list
        processing inserted max/min function (now JOIN::prepare will be called only once)
        methods of changing item for subselect engines
      sql/item_subselect.h:
        change item & results procedure
      sql/item_sum.cc:
        Item_sum_hybrid::clear moved to .cc file (to keep .h clean and to make inserving/removing debug info easy)
      sql/item_sum.h:
        Item_sum_hybrid::clear moved to .cc file (to keep .h clean and to make inserving/removing debug info easy)
      sql/sql_lex.cc:
        note about new method
      sql/sql_lex.h:
        method for changing result of UNION JOINs
      sql/sql_select.cc:
        method for changing result in JOIN
      sql/sql_select.h:
        method for changing result in JOIN
      sql/sql_union.cc:
        method for changing result in JOIN
      e54ca13b
  18. 06 May, 2004 4 commits
    • unknown's avatar
      postreview fixes · cd328cc2
      unknown authored
      sql/sql_lex.h:
        description of field
      sql/sql_union.cc:
        layout fixed
      cd328cc2
    • unknown's avatar
      fake_select_lex should be prepared during PS preparation to work correctly · 56568288
      unknown authored
      item_list for fake_select will be created only once
      (problem reported by valgrind in test_union2 fixed)
      
      
      sql/sql_lex.h:
        new function to keep code in one place
      sql/sql_union.cc:
        fake_select_lex should be prepared during PS preparation to work correctly
        item_list for fake_select will be created only once
      56568288
    • unknown's avatar
      Fixed (portability) bug in handler.h, and tried to silence cast warnings on some platforms. · 52656969
      unknown authored
      sql/handler.h:
        Fixed (portability) bug. No qualified method names in the class definition.
      sql/item_cmpfunc.h:
        Attempt to silence cast warnings on some platforms.
      sql/item_subselect.h:
        Attempt to silence cast warnings on some platforms.
      sql/set_var.cc:
        Silence warning (missing cast).
      sql/spatial.h:
        Attempt to silence cast warnings on some platforms.
      sql/sql_cache.cc:
        Silence warning (wrong cast).
      sql/sql_lex.h:
        Attempt to silence cast warnings on some platforms.
      52656969
    • unknown's avatar
      EXPLAIN UNION using same routing which used for execution which allow return... · 1a4f499c
      unknown authored
      EXPLAIN UNION using same routing which used for execution which allow return correct bug messages (Bug #3639)
      EXPLAIN of hidden SELECT of UNION
      
      
      mysql-test/r/derived.result:
        explain of hidden select
      mysql-test/r/subselect.result:
        explain of hidden select
      mysql-test/r/union.result:
        explain of hidden select
        correct error messages on explain
      mysql-test/t/subselect.test:
        show eliminated costants in WHERE clause
      mysql-test/t/union.test:
        correct error messages on EXPLAIN with union
      sql/item.cc:
        fixed name constructing for global ORDER BY items
      sql/sql_class.h:
        select ID can be negative (for hidden SELECTs)
        removed unused field
      sql/sql_lex.cc:
        new flag of UNION EXPLAIN
      sql/sql_lex.h:
        new flag of UNION EXPLAIN
        select ID can be negative (for hidden SELECTs)
      sql/sql_select.cc:
        EXPLAIN UNION using same routing which used for execution
        explain for hidden SELECT of UNION
      sql/sql_union.cc:
        EXPLAIN UNION using same routing which used for execution
      1a4f499c
  19. 05 May, 2004 1 commit
    • unknown's avatar
      caching of queries with isammerge tables forbiden using general way · f6428e8b
      unknown authored
      SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause
      correct table list passed to class constructor of select_update
      
      
      mysql-test/r/subselect.result:
        do not show limit if it is not explicit
      mysql-test/r/union.result:
        test of LIMIT + ORDER
      mysql-test/t/union.test:
        test of LIMIT + ORDER
      sql/ha_isammrg.h:
        caching of queries with isammerge tables forbiden
      sql/sql_cache.cc:
        removed check on isammerge
      sql/sql_lex.cc:
        tag of explicit limit in statement
      sql/sql_lex.h:
        tag of explicit limit in statement
      sql/sql_parse.cc:
        blanks in empty line removed
        no limit by default (SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause)
      sql/sql_union.cc:
        reverted incorrect patch
      sql/sql_update.cc:
        reverted incorrect patch
        correct table list passed to class constructor
      sql/sql_yacc.yy:
        explicit LIMIT marked
      f6428e8b
  20. 07 Apr, 2004 1 commit
    • unknown's avatar
      new error for unsupported command in PS · c9d856c8
      unknown authored
      fixed IN subselect with basic constant left expression
      SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406)
      fixed multiupdate privelege check (BUG#3408)
      fixed multiupdate tables check (BUG#3411)
      unchecked commands now is rejected by PS protocol to avoid serever crash
      fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
      
      
      include/mysqld_error.h:
        new error for unsupported command in PS
      mysql-test/r/multi_update.result:
        test sutes (BUG#3408, BUG#3411)
      mysql-test/t/multi_update.test:
        test sutes (BUG#3408, BUG#3411)
      sql/item_cmpfunc.cc:
        fixed IN subselect with basic constant left expression
      sql/mysql_priv.h:
        some function frop sql_parse.h become public
      sql/set_var.cc:
        check for SET command via PS
      sql/set_var.h:
        check for SET command via PS
      sql/share/czech/errmsg.txt:
        new error for unsupported command in PS
      sql/share/danish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/dutch/errmsg.txt:
        new error for unsupported command in PS
      sql/share/english/errmsg.txt:
        new error for unsupported command in PS
      sql/share/estonian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/french/errmsg.txt:
        new error for unsupported command in PS
      sql/share/german/errmsg.txt:
        new error for unsupported command in PS
      sql/share/greek/errmsg.txt:
        new error for unsupported command in PS
      sql/share/hungarian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/italian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/japanese/errmsg.txt:
        new error for unsupported command in PS
      sql/share/korean/errmsg.txt:
        new error for unsupported command in PS
      sql/share/norwegian-ny/errmsg.txt:
        new error for unsupported command in PS
      sql/share/norwegian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/polish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/portuguese/errmsg.txt:
        new error for unsupported command in PS
      sql/share/romanian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/russian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/serbian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/slovak/errmsg.txt:
        new error for unsupported command in PS
      sql/share/spanish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/swedish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/ukrainian/errmsg.txt:
        new error for unsupported command in PS
      sql/sql_lex.cc:
        first table unlincking procedures for CREATE command
      sql/sql_lex.h:
        first table unlincking procedures for CREATE command
      sql/sql_parse.cc:
        used function to exclude first table from list
        SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406)
        fixed multiupdate privelege check (BUG#3408)
        fixed multiupdate tables check (BUG#3411)
      sql/sql_prepare.cc:
        fixed a lot of commands to be compatible with PS
        unchecked commands now is rejected to avoid serever crash
      sql/sql_select.cc:
        allow empty result for PS preparing
      sql/sql_union.cc:
        fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
      sql/sql_update.cc:
        fixed update to use correct tables lists (BUG#3408)
      sql/table.h:
        flag to support multi update tables check (BUG#3408)
      tests/client_test.c:
        removed unsupported tables
        fixed show table test
        added new tests
      c9d856c8
  21. 05 Apr, 2004 2 commits
    • unknown's avatar
      Many files: · ef8a5401
      unknown authored
        SQL Syntax for Prepared Statements (WL#1622)
      ps.test, ps.result:
        new file
      
      
      sql/item.cc:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/item.h:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/lex.h:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/mysql_priv.h:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/mysqld.cc:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/sql_class.cc:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/sql_class.h:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/sql_lex.h:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/sql_parse.cc:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/sql_prepare.cc:
        SQL Syntax for Prepared Statements (WL#1622)
      sql/sql_yacc.yy:
        SQL Syntax for Prepared Statements (WL#1622)
      ef8a5401
    • unknown's avatar
      Fixed many compiler warnings · 7873b89f
      unknown authored
      Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
      Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
      Set locked_in_memory properly
      
      
      include/mysql_com.h:
        Fixed compiler warning
      libmysqld/emb_qcache.cc:
        Removed not used variable
      libmysqld/lib_sql.cc:
        Removed not used variable
      myisam/mi_locking.c:
        Added comment
      myisam/mi_rnext.c:
        Fixed bug in concurrent insert
      myisam/mi_rprev.c:
        Simple optimization
      mysql-test/r/func_gconcat.result:
        New tests
      mysql-test/t/func_gconcat.test:
        New tests
      mysql-test/t/func_group.test:
        Cleanup
      sql-common/client.c:
        Removed compiler warning
      sql/derror.cc:
        Better comments
      sql/field.cc:
        Removed not used function/variable
      sql/field.h:
        Removed not needed variable
      sql/ha_innodb.cc:
        Removed not used function
      sql/item.cc:
        Fixed compiler warning
      sql/item_cmpfunc.cc:
        Fixed compiler warning
      sql/item_func.cc:
        Fixed compiler warning
      sql/item_geofunc.cc:
        Fixed compiler warning
      sql/item_sum.cc:
        Fixed bugs in group_concat and added more comments
        (Bugs #2695, #3381 and #3319)
        - field->abs_offset was not needed
        - Wrong assumption of field order in temporary table
        - Some not used variables removed
        - Added ORDER BY fields after argument fields so that code in sql_select.cc can move all fields to point to temporary tables, if needed.
        - Optimized loops
      sql/item_sum.h:
        Bug fixing and cleanup of group_concat()
      sql/log.cc:
        Removed wrong comment
      sql/log_event.cc:
        Removed compiler warning
      sql/mysqld.cc:
        Set locked_in_memory properly
      sql/protocol.cc:
        Removed compiler warning
      sql/set_var.cc:
        Code cleanup
      sql/slave.cc:
        Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
      sql/sql_cache.cc:
        Removed compiler warnings
      sql/sql_derived.cc:
        Removed not used variable
      sql/sql_insert.cc:
        Removed compiler warnings
      sql/sql_lex.cc:
        Removed not used lable
      sql/sql_lex.h:
        Removed compiler warnings
      sql/sql_parse.cc:
        Removed compiler warnings
      sql/sql_prepare.cc:
        Removed compiler warnings
      sql/sql_select.cc:
        Removed not used variables
        Added function comments
      sql/sql_show.cc:
        Removed compiler warnings
      sql/sql_yacc.yy:
        Fix for ORDER BY handling in GROUP_CONCAT()
      7873b89f
  22. 02 Apr, 2004 1 commit
    • unknown's avatar
      WL#1266 "Separate auto-set logic from TIMESTAMP type." · 32b28f92
      unknown authored
      Final version of patch.
      
      Adds support for specifying of DEFAULT NOW() and/or ON UPDATE NOW()
      clauses for TIMESTAMP field definition.
      Current implementation allows only one such field per table and
      uses several unireg types for storing info about this properties of
      field. It should be replaced with better implementation when new
      .frm format is introduced.
      
      
      include/mysqld_error.h:
        Added error codes for case when we have more than one column with NOW()
        in DEFAULT or ON UPDATE clauses and for case when we are using ON UPDATE
        clause with wrong type.
      mysql-test/r/create.result:
        Added tests for using of DEFAULT NOW() and ON UPDATE NOW() with
        non-TIMESTAMP fields.
      mysql-test/r/show_check.result:
        Updated test results to reflect new default look of TIMESTAMP fields
        in SHOW CREATE TABLE.
      mysql-test/r/system_mysql_db.result:
        Updated test results to reflect new default look of TIMESTAMP fields
        in SHOW CREATE TABLE.
      mysql-test/r/type_ranges.result:
        Updated test results to reflect new default look of TIMESTAMP fields
        in SHOW COLUMNS.
      mysql-test/r/type_timestamp.result:
        Added tests for various DEFAULT and ON UPDATE clauses for TIMESTAMP
        fields definitions.
      mysql-test/t/create.test:
        Added tests for using of DEFAULT NOW() and ON UPDATE NOW() with
        non-TIMESTAMP fields.
      mysql-test/t/type_timestamp.test:
        Added tests for various DEFAULT and ON UPDATE clauses for TIMESTAMP
        fields definitions.
      sql/field.cc:
        Added support for various combinations of DEFAULT and ON UPDATE clauses
        for TIMESTAMP field. 
        
        Setting TABLE::timestamp* members for TIMESTAMP fields with auto-set 
        option taking into account their unireg type (which corresponds to 
        various DEFAULT/ON UPDATE values combinations). Replaced 
        TABLE::time_stamp with TABLE::timestamp_default_now/on_update_now
        couple moved their setup to separate method set_timestamp_offsets(),
        which now is called from  open_table instead of Field_timestamp cons.
      sql/field.h:
        Added more unireg types for handling of DEFAULT NOW() and ON UPDATE
        NOW() for TIMESTAMP fields.
        Fixed value corresponding to DEFAULT item for TIMESTAMP field.
      sql/ha_berkeley.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/ha_heap.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/ha_innodb.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/ha_isam.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/ha_isammrg.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/ha_myisam.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/ha_myisammrg.cc:
        Now TIMESTAMP column with auto-set property could be updated during
        INSERT or/and UPDATE independently.
      sql/item_func.h:
        We need to distinguish NOW() from other function for using in 
        DEFAULT and in ON UPDATE clauses.
      sql/item_timefunc.h:
        We need to distinguish NOW() from other function for using in 
        DEFAULT and in ON UPDATE clauses.
      sql/mysql_priv.h:
        Added parameter for ON UPDATE value to add_field_to_list() function.
      sql/share/czech/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/danish/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/dutch/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/english/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/estonian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/french/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/german/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/greek/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/hungarian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/italian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/japanese/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/korean/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/norwegian-ny/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/norwegian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/polish/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/portuguese/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/romanian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/russian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/serbian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/slovak/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/spanish/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/swedish/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/share/ukrainian/errmsg.txt:
        Added error messages for case when we have more than one column with
        NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
        ON UPDATE clauses and for case when we are using ON UPDATE clause with
        wrong type.
      sql/sql_base.cc:
        Added setup of TABLE::timestamp_default_now/on_update_now pair
        for each statement to open_table().
      sql/sql_insert.cc:
        Using TABLE::timestamp_default_now/on_update_now pair instead of
        old TABLE::time_stamp. Added check for case then REPLACE could not
        be converted to UPDATE because of different DEFAULT/ON UPDATE values
        for TIMESTAMP field.
      sql/sql_lex.h:
        Added member for value used in ON UPDATE clause to st_lex.
      sql/sql_load.cc:
        Using TABLE::timestamp_default_now/on_update_now pair instead of
        old TABLE::time_stamp. We don't need to restore these members
        since they are set up for each statement in open_table().
      sql/sql_parse.cc:
        Added handling of DEFAULT NOW() and ON UPDATE NOW() clauses for
        TIMESTAMP fields to add_field_to_list() function.
      sql/sql_show.cc:
        Added support for DEFAULT CURRENT_TIMESTAMP (aka NOW() ) and 
        ON UPDATE CURRENT_TIMESTAMP to SHOW CREATE TABLE and SHOW COLUMNS.
      sql/sql_table.cc:
        mysql_create_table() function - added check for number of TIMESTAMP 
          fields with auto-set values and replacing of old style TIMESTAMPs
          with their newer analogs.
        mysql_alter_table(): Using TABLE::timestamp_default_now/on_update_now 
          pair instead of old TABLE::time_stamp. We don't need to restore these
          members since they are set up for each statement in open_table().
      sql/sql_update.cc:
        Left only setting of TABLE::timestamp_default_now/on_update_now
        to 0 since they should be already set up in open_table().
      sql/sql_yacc.yy:
        Added support for DEFAULT NOW() and ON UPDATE NOW() in field
        definitions.
      sql/table.h:
        Replaced TABLE::time_stamp withTABLE::timestamp_default_now/timestamp_on_update_now
        pair which allows to distinguish TIMESTAMP's with various DEFAULT/ON UPDATE
        clauses and optimize checks if TIMESTAMP field should be set to NOW()
        in handlers.
      sql/unireg.cc:
        Now we are marking only TIMESTAMP fields with NOW() as default or
        as on update value as special field for unireg.
      32b28f92
  23. 30 Mar, 2004 1 commit
    • unknown's avatar
      Worklog#1563 - Support of on-line CREATE/DROP INDEX. · f5297edc
      unknown authored
      This is to enable table handlers to implement online create/drop index.
      It consists of some parts:
      - New default handler methods in handler.h
      - Split of mysql_alter_table. It decides if only one kind of
        alteration is to be done (e.g. only create indexes or only drop
        indexes etc.) It then calls the specialized new handler method if
        the handler implements it. Otherwise it calls real_alter_table.
      - The parser sets flags for each alter operation detected in a
        command. These are used by mysql_alter_table for the decision.
      - mysql_prepare_table is pulled out of mysql_create_table. This is
        also used by mysql_create_index to prepare the key structure array
        for the handler. It is also used by mysql_create_index and
        mysql_drop_index to prepare a call to mysql_create_frm.
      - mysql_create_frm is pulled out of rea_create_table for use by
        mysql_create_index and mysql_drop_index after the index is
        created/dropped.
      Thanks to Antony who supplied most of the changes.
      
      
      sql/handler.h:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        New virtual handler methods with default implementation and return flags.
      sql/mysql_priv.h:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        New function prototypes. mysql_prepare_table is pulled out of
        mysql_create_table. It prepares a table structure, which is used by 
        mysql_create_table, mysql_create_index and mysql_drop_index.
        real_alter_table is pulled out of mysql_alter_table. The latter only
        looks if the requested operation can be done by specialized functions
        or else calls real_alter_table, which does the real thing.
        mysql_add_column and mysql_drop_colunm are for future use. They simply
        call real_alter_table. mysql_create_frm is pulled out of
        rea_create_table. It is called also from mysql_create_index and
        mysql_drop_index after successful create/drop index.
        mysql_alter_table prototype is extended by the new alter_flags argument.
      sql/sql_base.cc:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        mysql_create_index and mysql_drop_index moved to sql_table.cc.
      sql/sql_lex.h:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        Definitions for the new alter_flags.
      sql/sql_parse.cc:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        Extend the calls to mysql_alter_table by the new alter_flags argument.
      sql/sql_table.cc:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        mysql_prepare_table is pulled out of mysql_create_table.
        mysql_create_index and mysql_drop_index are changed so that they use
        the new handler functions if the handler implements them.
        mysql_add_column and mysql_drop_column are for future use. They simply
        call real_alter_table. mysql_alter_table only decides which function
        to use for the requested operation. real_alter_table implements most
        of what mysql_alter_table did before.
      sql/sql_yacc.yy:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        Set the alter_flags where appropriate.
      sql/unireg.cc:
        Worklog#1563 - Support of on-line CREATE/DROP INDEX.
        mysql_create_frm is pulled out of rea_create_table.
      f5297edc
  24. 29 Mar, 2004 1 commit
    • unknown's avatar
      after review patch · 0a073770
      unknown authored
      commant for function
      
      
      sql/item_subselect.cc:
        redusing number of parameters
      sql/sql_derived.cc:
        redusing number of parameters
      sql/sql_lex.cc:
        redusing number of parameters
        comment for function
      sql/sql_lex.h:
        redusing number of parameters
      sql/sql_parse.cc:
        redusing number of parameters
      sql/sql_select.cc:
        redusing number of parameters
      sql/sql_union.cc:
        redusing number of parameters
      0a073770
  25. 23 Mar, 2004 1 commit
  26. 02 Mar, 2004 1 commit
    • unknown's avatar
      Desperate attempt to push part of prepared statements cleanup which was · 7b68eaaf
      unknown authored
      reviewed in Saint-Petersbourg (including post-review fixes).
      
      
      include/my_sys.h:
        Added clear_alloc_root (reset alloc root without freeing its memory)
      sql/item.h:
        - rename setup_param -> set_parap (function assigns parameter value to item)
      sql/mysql_priv.h:
        - all return values are void, because return value is never checked in
            dispatch_command
        - removed unused declaration of setup_param_functions
      sql/protocol.h:
        - unused declarations of setup_params_data* removed
      sql/sql_class.cc:
        Cleanup:
          - bzero(mem_root) replaced with clear_alloc_root
          - query_id and command members moved back to THD from Statement
        Assignment of mem_root, free_list, query_id and command optimized
        away from set_statement().
      sql/sql_class.h:
        - query_id and command moved back to THD from Statement
      sql/sql_lex.h:
        - better type for param_list
        - param_count is the same thing as param_list.elements
      sql/sql_parse.cc:
        - comments for dispatch_command
      sql/sql_prepare.cc:
        Cleanup:
        - added comments to many functions and removed trailing spaces in many 
          lines, some stale comments removed.
        - it's faster to iterate using pointers, than classes
        - Renames: error_in_prepare renamed to get_longdata_error (because it is set
          when there is an error in mysql_send_longdata, rather than in
          mysql_prepare), embedded versions of placeholder assignement functions
          now have prefix emb_, setup_ functions renamed to set_, because they
          perform assignment, not installation, setup_params_data now doesn't
          call insert_params and was renamed to setup_set_param_functions,
        - find_prepared_statement should not send error if called from no-reply
          calls, like mysql_stmt_reset
        - error reporting is checked up, to always report errors and not report
          errors twice. send_prep_stmt can be done mostly in send_prepare_result, 
          rather than in test_* functions.
        - now we don't need to reinit THD->mem_root/free_list in mysql_stmt_execute,
          because it's not reset there.
      tests/client_test.c:
        - removed second call to test_subqueries
      7b68eaaf
  27. 17 Feb, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · e55c4ed1
      unknown authored
      Phase 1: Introduced sp_name class, for qualified name support.
      
      
      sql/item_func.cc:
        Introduced sp_name class; moved some methods from item_func.h.
      sql/item_func.h:
        Introduced sp_name class; moved some methods to item_func.cc.
      sql/sp.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp.h:
        Introduced sp_name class, for qualified name support.
      sql/sp_cache.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp_cache.h:
        Introduced sp_name class, for qualified name support.
      sql/sp_head.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp_head.h:
        Introduced sp_name class, for qualified name support.
      sql/sql_lex.h:
        Introduced sp_name class, for qualified name support.
      sql/sql_parse.cc:
        Introduced sp_name class, for qualified name support.
      sql/sql_yacc.yy:
        Introduced sp_name class, for qualified name support.
      e55c4ed1
  28. 12 Feb, 2004 1 commit
    • unknown's avatar
      memory leacks in PS with subqueries fixed (adddition to fix of BUG#2462) · 4b37cf65
      unknown authored
      sql/item.h:
        mechanism to keep reference in cache array for row IN
      sql/item_cmpfunc.cc:
        mechanism to keep reference in cache array for row IN
        layout fixed
      sql/item_cmpfunc.h:
        mechanism to keep reference in cache array for row IN
      sql/item_subselect.cc:
        fixed memory pools swapping
        prevented deleting Item_in_optimizer cache in case of row IN subquery
      sql/mysql_priv.h:
        declarations of function moved to be useful in sql_class.h
      sql/sql_base.cc:
        keep fields expanded from '*' in statement memory pool
      sql/sql_class.cc:
        fixed restoring/backup of memory pool and list of items
      sql/sql_class.h:
        memory allocation methods moved to Statement
        memory pool substituting for preparing
      sql/sql_lex.cc:
        ref_pointer_array kept in statement memory
      sql/sql_lex.h:
        reinitialization of UNIT
      sql/sql_prepare.cc:
        memory allocation/swapping fixed
      tests/client_test.c:
        layout fixed
      4b37cf65
  29. 10 Feb, 2004 1 commit
    • unknown's avatar
      after merge & valgrind test fixes (BUG#2120) · ecb11989
      unknown authored
      sql/sql_derived.cc:
        memory leack fixed
      sql/sql_lex.cc:
        flag to avoid double cleaning
      sql/sql_lex.h:
        flag to avoid double cleaning
      sql/sql_select.cc:
        right way to cleanup JOIN_TAB
      sql/sql_select.h:
        right way to cleanup JOIN_TAB
      sql/sql_union.cc:
        flag to avoid double cleaning
      ecb11989
  30. 08 Feb, 2004 1 commit
    • unknown's avatar
      fixed subquery with PS (BUG#2462) · 541cb675
      unknown authored
      fixed UNION preparation
      
      
      sql/item.cc:
        debug output added
      sql/item.h:
        debug output added
      sql/item_cmpfunc.cc:
        correct cleunup() for Item_in_optimizer
      sql/item_cmpfunc.h:
        correct cleunup() for Item_in_optimizer
        debug output added
      sql/item_func.h:
        debug output added
      sql/item_subselect.cc:
        support of prepared statemnts added - mostly memorry allocation manegement, only one trabsformatio & correct cleupup()
      sql/item_subselect.h:
        support of prepared statemnts added - mostly memorry allocation manegement, only one trabsformatio & correct cleupup()
      sql/item_sum.cc:
        debug output added
      sql/item_sum.h:
        debug output added
      sql/sql_class.cc:
        function to switch allocation arena for Items
      sql/sql_class.h:
        function to switch allocation arena for Items
        pointer on current prepared statement added
      sql/sql_lex.cc:
        comment fixed
      sql/sql_lex.h:
        item cleanup support
      sql/sql_prepare.cc:
        - fixed preparation of PS to avoid storing junk in its memory + correct work with union
        - fixed tables cleanup for UNION & subqueries
      sql/sql_select.cc:
        removed condition which is always true for now
        fixed layout
      sql/sql_union.cc:
        support of UNION subquery cleanup
      tests/client_test.c:
        test of repeatable subqueries
        test of correct UNION initialisation
      541cb675
  31. 01 Feb, 2004 2 commits
    • unknown's avatar
      make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table · 1f739ca4
      unknown authored
      (BUG#2120 sfter merge)
      
      
      mysql-test/r/derived.result:
        correct results of derived tble EXPLAIN
        test of "Using Index" with derived tables
      mysql-test/t/derived.test:
        test of "Using Index" with derived tables
      sql/mysql_priv.h:
        way to force derived table save JOIN after execution
      sql/sql_derived.cc:
        way to force derived table save JOIN after execution
      sql/sql_lex.h:
        way to force derived table save JOIN after execution
      sql/sql_select.cc:
        make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
      1f739ca4
    • unknown's avatar
      now all tables of query are locked in one place (including derived tables) · 68c0a299
      unknown authored
      fixed BUG#2120 and other problem with EXPLAINing derived tables
      
      
      mysql-test/r/derived.result:
        correct tables names & Co in derived tables
        test case for BUG#2120
      mysql-test/t/derived.test:
        test case for BUG#2120
      sql/mysql_priv.h:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables)
      sql/repl_failsafe.cc:
        correct initialization of TABLE_LIST
      sql/sql_acl.cc:
        used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
      sql/sql_base.cc:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables)
      sql/sql_delete.cc:
        all tables processing is done during opening
      sql/sql_derived.cc:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables) to sutisfy "all query tables locking" at the moment
      sql/sql_insert.cc:
        all tables processing is done during opening
        correct initialization of TABLE_LIST
      sql/sql_lex.cc:
        now table list will be created for whole query
        layout fix
        correct check of updated table in subqueries
      sql/sql_lex.h:
        now table list will be created for whole query
        correct check of updated table in subqueries
      sql/sql_olap.cc:
        THIS FUNCTION IS USED NOWHERE
        it will be good to remove it at all (handle_olaps)
      sql/sql_parse.cc:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables)
      sql/sql_prepare.cc:
        new creating list parameters
        all tables processing is done during opening
      sql/sql_select.cc:
        all tables processing is done during opening
      sql/sql_select.h:
        now it used only within file where is defined
      sql/sql_udf.cc:
        used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
      sql/sql_update.cc:
        all tables processing is done during opening
      68c0a299
  32. 28 Jan, 2004 1 commit
  33. 19 Dec, 2003 1 commit
    • unknown's avatar
      THD::lex now points to THD::main_lex like in 5.0 · 8d987f9e
      unknown authored
      All tests pass (client_test included)
      
      
      libmysqld/lib_sql.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/filesort.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/ha_innodb.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/ha_myisam.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/item.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/item_cmpfunc.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/item_create.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/item_func.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/item_subselect.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/item_sum.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/mysql_priv.h:
        THD::lex now points to THD::main_lex like in 5.0
      sql/mysqld.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/protocol.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/repl_failsafe.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/slave.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_acl.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_base.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_cache.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_class.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_class.h:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_delete.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_error.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_insert.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_lex.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_lex.h:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_parse.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_prepare.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_repl.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_select.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_table.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_union.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_update.cc:
        THD::lex now points to THD::main_lex like in 5.0
      sql/sql_yacc.yy:
        THD::lex now points to THD::main_lex like in 5.0
      8d987f9e