An error occurred fetching the project authors.
  1. 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
  2. 08 Aug, 2006 2 commits
    • 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
    • unknown's avatar
      Bug#16172 DECIMAL data type processed incorrectly · 9672ef61
      unknown authored
      issue an error in case of DECIMAL(M,N) if N > M
      
      
      mysql-test/r/type_newdecimal.result:
        Bug#16172 DECIMAL data type processed incorrectly
        result fix & test case
      mysql-test/t/type_newdecimal.test:
        Bug#16172 DECIMAL data type processed incorrectly
        test fix
      9672ef61
  3. 09 Jul, 2006 1 commit
    • unknown's avatar
      * Mixed replication mode * : · 81a80049
      unknown authored
      1) Fix for BUG#19630 "stored function inserting into two auto_increment breaks
      statement-based binlog":
      a stored function inserting into two such tables may fail to replicate
      (inserting wrong data in the slave's copy of the second table) if the slave's
      second table had an internal auto_increment counter different from master's.
      Because the auto_increment value autogenerated by master for the 2nd table
      does not go into binlog, only the first does, so the slave lacks information.
      To fix this, if running in mixed binlogging mode, if the stored function or
      trigger plans to update two different tables both having auto_increment
      columns, we switch to row-based for the whole function.
      We don't have a simple solution for statement-based binlogging mode, there
      the bug remains and will be documented as a known problem.
      Re-enabling rpl_switch_stm_row_mixed.
      2) Fix for BUG#20630 "Mixed binlogging mode does not work with stored
      functions, triggers, views", which was a documented limitation (in mixed
      mode, we didn't detect that a stored function's execution needed row-based
      binlogging (due to some UUID() call for example); same for
      triggers, same for views (a view created from a SELECT UUID(), and doing
      INSERT INTO sometable SELECT theview; would not replicate row-based).
      This is implemented by, after parsing a routine's body, remembering in sp_head
      that this routine needs row-based binlogging. Then when this routine is used,
      the caller is marked to require row-based binlogging too.
      Same for views: when we parse a view and detect that its SELECT needs
      row-based binary logging, we mark the calling LEX as such.
      3) Fix for BUG#20499 "mixed mode with temporary table breaks binlog":
      a temporary table containing e.g. UUID has its changes not binlogged,
      so any query updating a permanent table with data from the temporary table
      will run wrongly on slave. Solution: in mixed mode we don't switch back
      from row-based to statement-based when there exists temporary tables.
      4) Attempt to test mysqlbinlog on a binlog generated by mysqlbinlog;
      impossible due to BUG#11312 and BUG#20329, but test is in place for when
      they are fixed.
      
      
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        testing BUG#19630 "stored function inserting into two auto_increment breaks
        statement-based binlog",
        testing BUG#20930 "Mixed binlogging mode does not work with stored functions,
        triggers, views.
        testing BUG#20499 "mixed mode with temporary table breaks binlog".
        I have carefully checked this big result file, it is correct.
      mysql-test/t/disabled.def:
        re-enabling test
      mysql-test/t/rpl_switch_stm_row_mixed.test:
        Test for BUG#19630 "stored function inserting into two auto_increment breaks
        statement-based binlog":
        we test that it goes row-based, but only when needed;
        without the bugfix, master and slave's data differed.
        Test for BUG#20499 "mixed mode with temporary table breaks binlog":
        without the bugfix, slave had 2 rows, not 3.
        Test for BUG#20930 "Mixed binlogging mode does not work with stored
        functions, triggers, views".
        Making strings used more different, for easier tracking of "by which routine
        was this binlog line generated".
        Towards the end, an attempt to test mysqlbinlog on a binlog generated by
        the mixed mode; attempt failed because of BUG#11312 and BUG#20929.
      sql/item_create.cc:
        fix for build without row-based replication
      sql/set_var.cc:
        cosmetic: in_sub_stmt is exactly meant to say if we are in stored
        function/trigger, so better use it.
      sql/sp.cc:
        When a routine adds its tables to the top statement's tables, if this routine
        needs row-based binlogging, mark the entire top statement as well.
        Same for triggers.
        Needed for making the mixed replication mode work with stored functions
        and triggers.
      sql/sp_head.cc:
        new enum value for sp_head::m_flags, remembers if, when parsing the 
        routine, we found at least one element (UUID(), UDF) requiring row-based
        binlogging.
      sql/sp_head.h:
        new enum value for sp_head::m_flags (see sp_head.cc).
        An utility method, intended for attributes of a routine which need
        to propagate upwards to the caller; so far only used for binlogging
        information, but open to any other attribute.
      sql/sql_base.cc:
        For BUG#19630 "stored function inserting into two auto_increment
        breaks statement-based binlog":
        When we come to locking tables, we have collected all tables used by
        functions, views and triggers, we detect if we're going to update two tables
        having auto_increment columns. If yes, statement-based binlogging won't work
        (Intvar_log_event records only one insert_id) so, if in mixed binlogging
        mode, switch to row-based.
        For making mixed mode work with stored functions using UUID/UDF:
        when we come to locking tables, we have parsed the whole body so know if
        some elements need row-based. Generation of row-based binlog events
        depends on locked tables, so this is the good place to decide of the binlog
        format.
      sql/sql_class.h:
        Fix for BUG#20499 "mixed mode with temporary table breaks binlog".
        Making mixed mode work with stored functions/triggers: don't reset
        back to statement-based if in executing a stored function/trigger.
      sql/sql_lex.cc:
        fix for build without row-based replication.
        binlog_row_based_if_mixed moves from st_lex to Query_tables_list, because
        that boolean should not be affected when a SELECT reads the INFORMATION_SCHEMA
        and thus implicitely parses a view or routine's body: this body may
        contain needing-row-based components like UUID() but the SELECT on
        INFORMATION_SCHEMA should not be affected by that and should not use
        row-based; as Query_tables_list is backed-up/reset/restored when parsing
        the view/routine's body, so does binlog_row_based_if_mixed and the
        top SELECT is not affected.
      sql/sql_lex.h:
        fix for build without row-based replication.
        binlog_row_based_if_mixed moves from st_lex to Query_tables_list
        (see sql_lex.cc)
      sql/sql_parse.cc:
        For the mixed mode to work with stored functions using UUID and UDF, we need
        to move the switch-back-from-row-to-statement out of
        mysql_execute_command() (which is executed for each statement, causing
        the binlogging mode to change in the middle of the function, which would
        not work)
        The switch to row-based is now done in lock_tables(), no need to keep it
        in mysql_execute_command(); in lock_tables() we also switch back from 
        row-based to statement-based (so in a stored procedure, all statements
        have their binlogging mode). We must however keep a resetting in
        mysql_reset_thd_for_next_command() as e.g. CREATE PROCEDURE does not call
        lock_tables().
      sql/sql_view.cc:
        When a view's body needs row-based binlogging (e.g. the view is created
        from SELECT UUID()), propagate this fact to the top st_lex.
      sql/sql_yacc.yy:
        use TRUE instead of 1, for binlog_row_based_if_mixed.
      81a80049
  4. 02 Jul, 2006 1 commit
    • unknown's avatar
      Bug#20570: CURRENT_USER() in a VIEW with SQL SECURITY DEFINER returns · a2fc4843
      unknown authored
                 invoker name
      
      The bug was fixed similar to how context switch is handled in
      Item_func_sp::execute_impl(): we store pointer to current
      Name_resolution_context in Item_func_current_user class, and use
      its Security_context in Item_func_current_user::fix_fields().
      
      
      mysql-test/r/view_grant.result:
        Add result for bug#20570.
      mysql-test/t/view_grant.test:
        Add test case for bug#20570.
      sql/item_create.cc:
        Remove create_func_current_user(), as it is not used for automatic
        function creation.
      sql/item_create.h:
        Remove prototype for create_func_current_user().
      sql/item_strfunc.cc:
        Add implementations for Item_func_user::init(),
        Item_func_user::fix_fields() and
        Item_func_current_user::fix_fields() methods.  The latter uses
        Security_context from current Name_resolution_context, if one is
        defined.
      sql/item_strfunc.h:
        Move implementation of CURRENT_USER() out of Item_func_user to
        to new Item_func_current_user class.  For both classes calculate
        user name in fix_fields() method.
        For Item_func_current_user add context field to store
        Name_resolution_context in effect.
      sql/sql_yacc.yy:
        Pass current Name_resolution_context to Item_func_current_user.
      a2fc4843
  5. 12 Apr, 2006 1 commit
    • unknown's avatar
      Bug#16461: connection_id() does not work properly inside trigger · 886a35bd
      unknown authored
      CONNECTION_ID() was implemented as a constant Item, i.e. an instance of
      Item_static_int_func class holding value computed at creation time.
      Since Items are created on parsing, and trigger statements are parsed
      on table open, the first connection to open a particular table would
      effectively set its own CONNECTION_ID() inside trigger statements for
      that table.
      
      Re-implement CONNECTION_ID() as a class derived from Item_int_func, and
      compute connection_id on every call to fix_fields().
      
      
      mysql-test/r/trigger.result:
        Add result for bug#16461.
      mysql-test/t/trigger.test:
        Add test case for bug#16461.
      sql/item.cc:
        Remove now unused class Item_static_int_func.
      sql/item.h:
        Remove now unused class Item_static_int_func.
      sql/item_create.cc:
        Use new implementation of CONNECTION_ID().
      sql/item_func.cc:
        Re-implement CONNECTION_ID() as Item_func_connection_id
        (was Item_static_int_func).  Set max_length to 10, as it was before.
        Compute connection_id dynamically on every call to fix_fields().
      sql/item_func.h:
        Re-implement CONNECTION_ID() as Item_func_connection_id
        (was Item_static_int_func).
      886a35bd
  6. 13 Mar, 2006 1 commit
    • unknown's avatar
      Fixes to the replication mixed mode (patch approved by Monty): · b9f6f9bc
      unknown authored
      - detect the need for row-based binlogging not at execution stage but earlier at parsing stage; needed for example for CREATE TABLE SELECT UUID().
      - more tests of this mixed mode.
      
      
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        result update
      mysql-test/t/rpl_switch_stm_row_mixed.test:
        testing more scenarios for the mixed replication mode.
        Added support for manual testing of UDFs vs the mixed mode (behind a variable in the test).
        Changing old file names to better ones.
      sql/item_create.cc:
        at parse time, when we see a UUID(), put up a flag in LEX to say this binlogs properly only with row-based binlogging.
      sql/item_func.cc:
        it's not perfect to put up the flag at this execution stage, better do it at parse stage.
      sql/item_strfunc.cc:
        it's not perfect to put up the flag at this execution stage, better do it at parse stage
      sql/set_var.cc:
        this assertion is wrong, this piece of code can happen in RBR mode too.
      sql/sql_lex.cc:
        when we reinitialize the LEX members before every query, we have to reinitialize the new flag
      sql/sql_lex.h:
        A new flag, set at parsing stage, which tells if some items seen during parsing stage require row-based replication to binlog/replicate correctly
        when this statement is later executed.
        It has to be in LEX and not directly in THD, for this to work in prepared statements.
      sql/sql_parse.cc:
        Parsing stage happened at some time in the past and set up the flag in LEX, now that we execute the statement we actually turn on row-based binlogging
        if the thread's binlog format is "mixed". We then turn it off when leaving mysql_execute_command().
        Some cleanup code was not executed if leaving mysql_execute_command() at the "error" label, fixing this. A better fix than the "goto end" would be
        to modify each "goto error" to "res=1; goto end" but it required changing many lines which I don't want to do now ("make smallest possible patch").
      sql/sql_yacc.yy:
        When at parsing stage we see a UDF we put up a flag to say that row-based binlogging is preferred.
      b9f6f9bc
  7. 21 Dec, 2005 1 commit
    • unknown's avatar
      Adding XPath support: ExtractValue and UpdateXML functions. · 5e4c3ce6
      unknown authored
      libmysqld/Makefile.am:
      sql/Makefile.am:
        Adding new source files.
        Adding new file into build process.
      include/my_xml.h:
      strings/xml.c:
        Adding new XML parse flags to skip text normalization and 
        to use relative tag names. Adding enum for XML token types.
      sql/lex.h:
        Making parser aware of new SQL functions.
      sqll/item_create.h, sql/item_create.cc:
        Adding creators for ExtractValue and UpdateXML.
      sql/item.h:
        Adding new Item types: nodeset and nodeset comparator.
      sql/item_xmlfunc.h
      sql/item_xmlfunc.cc
        Adding new classes implementing XPath functions.
      mysql-test/t/xml.test, mysql-test/r/xml.result:
        New files: adding test case
      
      
      include/my_xml.h:
        Adding ExtractValue and UpdateXML functions.
        Adding XML parser flags and enum for XML token types.
      sql/Makefile.am:
        Adding new source files.
      sql/item.h:
        Adding new Item types: nodeset and nodeset comparator.
      sql/item_create.cc:
        Adding creators for ExtractValue and UpdateXML.
      sql/item_create.h:
        Adding creators for ExtractValue and UpdateXML.
      sql/lex.h:
        Make parse aware of new SQL functions.
      strings/xml.c:
        Adding new flags to skip text normalization and 
        to use relative tag names.
      libmysqld/Makefile.am:
        Adding new file into build process.
      5e4c3ce6
  8. 23 Nov, 2005 1 commit
    • unknown's avatar
      Table definition cache, part 2 · f631b361
      unknown authored
      The table opening process now works the following way:
      - Create common TABLE_SHARE object
      - Read the .frm file and unpack it into the TABLE_SHARE object
      - Create a TABLE object based on the information in the TABLE_SHARE
        object and open a handler to the table object
      
      Other noteworthy changes:
      - In TABLE_SHARE the most common strings are now LEX_STRING's
      - Better error message when table is not found
      - Variable table_cache is now renamed 'table_open_cache'
      - New variable 'table_definition_cache' that is the number of table defintions that will be cached
      - strxnmov() calls are now fixed to avoid overflows
      - strxnmov() will now always add one end \0 to result
      - engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
      - After creating a field object one must call field->init(table) before using it
      
      - For a busy system this change will give you:
       - Less memory usage for table object
       - Faster opening of tables (if it's has been in use or is in table definition cache)
       - Allow you to cache many table definitions objects
       - Faster drop of table
      
      
      mysql-test/mysql-test-run.sh:
        Fixed some problems with --gdb option
        Test both with socket and tcp/ip port that all old servers are killed
      mysql-test/r/flush_table.result:
        More tests with lock table with 2 threads + flush table
      mysql-test/r/information_schema.result:
        Removed old (now wrong) result
      mysql-test/r/innodb.result:
        Better error messages (thanks to TDC patch)
      mysql-test/r/merge.result:
        Extra flush table test
      mysql-test/r/ndb_bitfield.result:
        Better error messages (thanks to TDC patch)
      mysql-test/r/ndb_partition_error.result:
        Better error messages (thanks to TDC patch)
      mysql-test/r/query_cache.result:
        Remove tables left from old tests
      mysql-test/r/temp_table.result:
        Test truncate with temporary tables
      mysql-test/r/variables.result:
        Table_cache -> Table_open_cache
      mysql-test/t/flush_table.test:
        More tests with lock table with 2 threads + flush table
      mysql-test/t/merge.test:
        Extra flush table test
      mysql-test/t/multi_update.test:
        Added 'sleep' to make test predictable
      mysql-test/t/query_cache.test:
        Remove tables left from old tests
      mysql-test/t/temp_table.test:
        Test truncate with temporary tables
      mysql-test/t/variables.test:
        Table_cache -> Table_open_cache
      mysql-test/valgrind.supp:
        Remove warning that may happens becasue threads dies in different order
      mysys/hash.c:
        Fixed wrong DBUG_PRINT
      mysys/mf_dirname.c:
        More DBUG
      mysys/mf_pack.c:
        Better comment
      mysys/mf_tempdir.c:
        More DBUG
        Ensure that we call cleanup_dirname() on all temporary directory paths.
        
        If we don't do this, we will get a failure when comparing temporary table
        names as in some cases the temporary table name is run through convert_dirname())
      mysys/my_alloc.c:
        Indentation fix
      sql/examples/ha_example.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/examples/ha_example.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/examples/ha_tina.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/examples/ha_tina.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/field.cc:
        Update for table definition cache:
        - Field creation now takes TABLE_SHARE instead of TABLE as argument
          (This is becasue field definitions are now cached in TABLE_SHARE)
          When a field is created, one now must call field->init(TABLE) before using it
        - Use s->db instead of s->table_cache_key
        - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
        - make_field() takes TABLE_SHARE as argument instead of TABLE
        - move_field() -> move_field_offset()
      sql/field.h:
        Update for table definition cache:
        - Field creation now takes TABLE_SHARE instead of TABLE as argument
          (This is becasue field definitions are now cached in TABLE_SHARE)
          When a field is created, one now must call field->init(TABLE) before using it
        - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
        - make_field() takes TABLE_SHARE as argument instead of TABLE
        - move_field() -> move_field_offset()
      sql/ha_archive.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_archive.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_berkeley.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Changed name of argument create() to not hide internal 'table' variable.
        table->s  -> table_share
      sql/ha_berkeley.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_blackhole.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_blackhole.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_federated.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Fixed comments
        Remove index variable and replace with pointers (simple optimization)
        move_field() -> move_field_offset()
        Removed some strlen() calls
      sql/ha_federated.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_heap.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Simplify delete_table() and create() as the given file names are now without extension
      sql/ha_heap.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_innodb.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_innodb.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_myisam.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Remove not needed fn_format()
        Fixed for new table->s structure
      sql/ha_myisam.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_myisammrg.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Don't set 'is_view' for MERGE tables
        Use new interface to find_temporary_table()
      sql/ha_myisammrg.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Added flag HA_NO_COPY_ON_ALTER
      sql/ha_ndbcluster.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Fixed wrong calls to strxnmov()
        Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed
        drop_table -> intern_drop_table()
        table->s -> table_share
        Move part_info to TABLE
        Fixed comments & DBUG print's
        New arguments to print_error()
      sql/ha_ndbcluster.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_partition.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        We can't set up or use part_info when creating handler as there is not yet any table object
        New ha_intialise() to work with TDC (Done by Mikael)
      sql/ha_partition.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Got set_part_info() from Mikael
      sql/handler.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        ha_delete_table() now also takes database as an argument
        handler::ha_open() now takes TABLE as argument
        ha_open() now calls ha_allocate_read_write_set()
        Simplify ha_allocate_read_write_set()
        Remove ha_deallocate_read_write_set()
        Use table_share (Cached by table definition cache)
      sql/handler.h:
        New table flag: HA_NO_COPY_ON_ALTER (used by merge tables)
        Remove ha_deallocate_read_write_set()
        get_new_handler() now takes TABLE_SHARE as argument
        ha_delete_table() now gets database as argument
      sql/item.cc:
        table_name and db are now LEX_STRING objects
        When creating fields, we have now have to call field->init(table)
        move_field -> move_field_offset()
      sql/item.h:
        tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR
         instead of BLOB
      sql/item_cmpfunc.cc:
        Fixed call to tmp_table_field_from_field_type()
      sql/item_create.cc:
        Assert if new not handled cast type
      sql/item_func.cc:
        When creating fields, we have now have to call field->init(table)
        dummy_table used by 'sp' now needs a TABLE_SHARE object
      sql/item_subselect.cc:
        Trivial code cleanups
      sql/item_sum.cc:
        When creating fields, we have now have to call field->init(table)
      sql/item_timefunc.cc:
        Item_func_str_to_date::tmp_table_field() now replaced by call to
         tmp_table_field_from_field_type() (see item_timefunc.h)
      sql/item_timefunc.h:
        Simply tmp_table_field()
      sql/item_uniq.cc:
        When creating fields, we have now have to call field->init(table)
      sql/key.cc:
        Added 'KEY' argument to 'find_ref_key' to simplify code
      sql/lock.cc:
        More debugging
        Use create_table_def_key() to create key for table cache
        Allocate TABLE_SHARE properly when creating name lock
        Fix that locked_table_name doesn't test same table twice
      sql/mysql_priv.h:
        New functions for table definition cache
        New interfaces to a lot of functions.
        New faster interface to find_temporary_table() and close_temporary_table()
      sql/mysqld.cc:
        Added support for table definition cache of size 'table_def_size'
        Fixed som calls to strnmov()
        Changed name of 'table_cache' to 'table_open_cache'
      sql/opt_range.cc:
        Use new interfaces
        Fixed warnings from valgrind
      sql/parse_file.cc:
        Safer calls to strxnmov()
        Fixed typo
      sql/set_var.cc:
        Added variable 'table_definition_cache'
        Variable table_cache renamed to 'table_open_cache'
      sql/slave.cc:
        Use new interface
      sql/sp.cc:
        Proper use of TABLE_SHARE
      sql/sp_head.cc:
        Remove compiler warnings
        We have now to call field->init(table)
      sql/sp_head.h:
        Pointers to parsed strings are now const
      sql/sql_acl.cc:
        table_name is now a LEX_STRING
      sql/sql_base.cc:
        Main implementation of table definition cache
        (The #ifdef's are there for the future when table definition cache will replace open table cache)
        Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places
        Views are not yet cached; For the moment we only cache if a table is a view or not.
        
        Faster implementation of find_temorary_table()
        Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()'
        Drop table is slightly faster as we can use the table definition cache to know the type of the table
      sql/sql_cache.cc:
        table_cache_key and table_name are now LEX_STRING
        'sDBUG print fixes
      sql/sql_class.cc:
        table_cache_key is now a LEX_STRING
        safer strxnmov()
      sql/sql_class.h:
        Added number of open table shares (table definitions)
      sql/sql_db.cc:
        safer strxnmov()
      sql/sql_delete.cc:
        Use new interface to find_temporary_table()
      sql/sql_derived.cc:
        table_name is now a LEX_STRING
      sql/sql_handler.cc:
        TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
      sql/sql_insert.cc:
        TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
      sql/sql_lex.cc:
        Make parsed string a const (to quickly find out if anything is trying to change the query string)
      sql/sql_lex.h:
        Make parsed string a const (to quickly find out if anything is trying to change the query string)
      sql/sql_load.cc:
        Safer strxnmov()
      sql/sql_parse.cc:
        Better error if wrong DB name
      sql/sql_partition.cc:
        part_info moved to TABLE from TABLE_SHARE
        Indentation changes
      sql/sql_select.cc:
        Indentation fixes
        Call field->init(TABLE) for new created fields
        Update create_tmp_table() to use TABLE_SHARE properly
      sql/sql_select.h:
        Call field->init(TABLE) for new created fields
      sql/sql_show.cc:
        table_name is now a LEX_STRING
        part_info moved to TABLE
      sql/sql_table.cc:
        Use table definition cache to speed up delete of tables
        Fixed calls to functions with new interfaces
        Don't use 'share_not_to_be_used'
        Instead of doing openfrm() when doing repair, we now have to call
        get_table_share() followed by open_table_from_share().
        Replace some fn_format() with faster unpack_filename().
        Safer strxnmov()
        part_info is now in TABLE
        Added Mikaels patch for partition and ALTER TABLE
        Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER
      sql/sql_test.cc:
        table_name and table_cache_key are now LEX_STRING's
      sql/sql_trigger.cc:
        TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
        safer strxnmov()
        Removed compiler warnings
      sql/sql_update.cc:
        Call field->init(TABLE) after field is created
      sql/sql_view.cc:
        safer strxnmov()
        Create common TABLE_SHARE object for views to allow us to cache if table is a view
      sql/structs.h:
        Added SHOW_TABLE_DEFINITIONS
      sql/table.cc:
        Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects
        
        The table opening process now works the following way:
        - Create common TABLE_SHARE object
        - Read the .frm file and unpack it into the TABLE_SHARE object
        - Create a TABLE object based on the information in the TABLE_SHARE
          object and open a handler to the table object
        
        open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats
      sql/table.h:
        TABLE objects for the same database table now share a common TABLE_SHARE object
        In TABLE_SHARE the most common strings are now LEX_STRING's
      sql/unireg.cc:
        Changed arguments to rea_create_table() to have same order as other functions
        Call field->init(table) for new created fields
      sql/unireg.h:
        Added OPEN_VIEW
      strings/strxnmov.c:
        Change strxnmov() to always add end \0
        This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
      f631b361
  9. 14 Sep, 2005 1 commit
    • unknown's avatar
      Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(), · b214671e
      unknown authored
       DAYOFWEEK(), and WEEKDAY().
      
      
      mysql-test/r/func_time.result:
        Fixed new results for testcases containing EXPLAIN EXTENDED SELECT ...
         WEEKDAY ... DAYNAME. The new results are correct and correspond to
         the changes in create_func_weekday() and create_func_dayname().
      mysql-test/r/view.result:
        Fixed some testcases results (bugs #12963, #13000).
      mysql-test/t/view.test:
        Added testcases for for bugs #12963, #13000.
      sql/item_create.cc:
        Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
         DAYOFWEEK(), and WEEKDAY().
         Modified create_func_dayname(), create_func_dayofweek(), and
         create_func_weekday(). They don´t insert Item_func_to_days
         object now.
      sql/item_timefunc.cc:
        Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
         DAYOFWEEK(), and WEEKDAY().
         Modified Item_func_weekday::val_int(). The argument of weekday should
         not be considered now to be Item_func_to_days object.
      sql/item_timefunc.h:
        Fixed bugs #12963, 13000: wrong VIEW creation with DAYNAME(),
         DAYOFWEEK(), and WEEKDAY.
         Modified Item_func_weekday::func_name(). It returns now different
         names depending on the odbc_type attribute value.
      b214671e
  10. 25 Aug, 2005 1 commit
    • unknown's avatar
      Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs. · 8a5e5274
      unknown authored
      "Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
      The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.
      
      
      mysql-test/r/rpl_sp.result:
        Fix for BUG#12335: updated test cases/results
      mysql-test/t/rpl_sp.test:
        Fix for BUG#12335: updated test cases/results
      sql/item.cc:
        Fix for BUG#12335 (SP replication): 
         - Added Item_name_const 'function'
         - Addede 'delete reuse' to call dtor on item reuse
      sql/item.h:
        Fix for BUG#12335 (SP replication) : Added Item_name_const 'function' + code cleanup
      sql/item_create.cc:
         Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
      sql/item_create.h:
         Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
      sql/item_func.cc:
        Fix for BUG#12335 (SP replication) : binary log is now constrolled from within execute_function.
      sql/lex.h:
        Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
      sql/log.cc:
        Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
        one to temporary disable binlogging but collect a 'union' information about binlog write
        calls.
      sql/mysql_priv.h:
        Fix for BUG#12335 (SP replication)
      sql/sp_head.cc:
        Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
        StoredRoutinesBinlogging for details
      sql/sp_head.h:
        Comments added
      sql/sp_pcontext.h:
        Comments added
      sql/sp_rcontext.h:
        Comments added
      sql/sql_class.cc:
        Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
        StoredRoutinesBinlogging for details
      sql/sql_class.h:
        Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
        one to temporary disable binlogging but collect a 'union' information about binlog write
        calls.
      sql/sql_delete.cc:
        Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
      sql/sql_insert.cc:
        Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
      sql/sql_lex.cc:
        Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
        the tokenizer.
      sql/sql_lex.h:
        Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
        the tokenizer.
      sql/sql_parse.cc:
        Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
        StoredRoutinesBinlogging for details
      sql/sql_update.cc:
        Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
      sql/sql_yacc.yy:
        Fix for BUG#12335 (SP replication) : When creating Item_splocal, remember where it is located
        in the query.
      8a5e5274
  11. 19 Aug, 2005 1 commit
  12. 12 Aug, 2005 1 commit
    • unknown's avatar
      Add SLEEP(seconds) function, which always returns 0 after the given · 7eebb751
      unknown authored
      number of seconds (which can include microseconds). (Bug #6760)
      
      
      mysql-test/r/func_misc.result:
        Add new results
      mysql-test/t/func_misc.test:
        Add new regression test.
      sql/item_create.cc:
        Add create_func_sleep()
      sql/item_create.h:
        Add create_func_sleep()
      sql/item_func.cc:
        Add sleep() implementation
      sql/item_func.h:
        Add class for sleep() function
      sql/lex.h:
        Handle SLEEP() function
      7eebb751
  13. 15 Jul, 2005 1 commit
    • 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
  14. 11 Apr, 2005 1 commit
  15. 10 Apr, 2005 1 commit
    • unknown's avatar
      Fix for bug #9796 "Query Cache caches queries with CURRENT_USER() · 3e0a6263
      unknown authored
      function".
      
      We should not cache queries using CURRENT_USER() function as we do it
      for some other functions, e.g. USER() function.
      
      
      mysql-test/r/query_cache.result:
        Let us test that queries with CURRENT_USER() function are not cached.
      mysql-test/t/query_cache.test:
        Let us test that queries with CURRENT_USER() function are not cached.
      sql/item_create.cc:
        create_func_current_user():
          We should not cache queries which use CURRENT_USER() function.
      3e0a6263
  16. 04 Mar, 2005 1 commit
    • unknown's avatar
      type_blob.result, func_system.result, func_str.result, ctype_collate.result: · c56d0283
      unknown authored
        fixing test results accordingly.
      func_system.test:
        New test that illegal mix of collations does not happen anymore.
      item_strfunc.h:
          safe_charset_converter() was added for system constants.
      item_strfunc.cc:
        safe_charset_converter() was added for system constants.
      item_func.cc, item.h, item.cc:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      item_create.cc:
        Version is a system constant too.
      
      
      sql/item.cc:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      sql/item.h:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      sql/item_create.cc:
        Version is a system constant too.
      sql/item_func.cc:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      sql/item_strfunc.cc:
        safe_charset_converter() was added for system constants.
      sql/item_strfunc.h:
          safe_charset_converter() was added for system constants.
      mysql-test/t/func_system.test:
        New test that illegal mix of collations does not happen anymore.
      mysql-test/r/ctype_collate.result:
        fixing test results accordingly.
      mysql-test/r/func_str.result:
        fixing test results accordingly.
      mysql-test/r/func_system.result:
        fixing test results accordingly.
      mysql-test/r/type_blob.result:
        fixing test results accordingly.
      c56d0283
  17. 08 Feb, 2005 1 commit
    • unknown's avatar
      Precision Math implementation · 91db48e3
      unknown authored
      BitKeeper/etc/ignore:
        Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
      91db48e3
  18. 26 Jan, 2005 1 commit
    • unknown's avatar
      innobase/include/univ.i · ea279502
      unknown authored
          remove a change that broke the test
      
      
      innobase/include/univ.i:
        remove a change that broke the test
      sql/item_create.cc:
        better fix
      ea279502
  19. 24 Jan, 2005 1 commit
  20. 29 Oct, 2004 1 commit
  21. 24 Aug, 2004 1 commit
    • unknown's avatar
      items for functions which is converted to constants internally to support its... · c688b7b8
      unknown authored
      items for functions which is converted to constants internally to support its correct printing added (BUG#4663)
      
      
      mysql-test/r/view.result:
        test of functions in VIEW which is converted to constants internally
      mysql-test/t/view.test:
        test of functions in VIEW which is converted to constants internally
      sql/item.h:
        items for functions which is converted to constants internally to support its correct printing
      sql/item_create.cc:
        items for functions which is converted to constants internally to support its correct printing
      c688b7b8
  22. 10 Aug, 2004 1 commit
    • unknown's avatar
      Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server". · 68d7b266
      unknown authored
      Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
      or setting of @@time_zone variable we should open and lock them with the rest of 
      statement's table (so we should add them to global table list) and after that use such 
      pre-opened tables for loading info about time zones.
      
      
      mysql-test/r/timezone2.result:
        Added test for bug #4508
      mysql-test/t/timezone2.test:
        Added test for bug #4508
      scripts/mysql_create_system_tables.sh:
        Added one more test time zone to time zone tables which is needed for test for bug #4508.
      sql/item_create.cc:
        CONVERT_TZ() now is treated as special function.
      sql/item_create.h:
        CONVERT_TZ() now is treated as special function.
      sql/item_timefunc.cc:
        Item_func_convert_tz now uses list of pre-opened time zone tables instead of trying to
        open them ad-hoc. Also it avoid calling of current_thd.
      sql/item_timefunc.h:
        Added comment describing special nature of CONVERT_TZ() function.
        Optimization: Added own fix_fields() method and tz_tables member for caching pointer
        to list of open time zone tables to Item_func_convert_tz class.
      sql/lex.h:
        CONVERT_TZ() now is treated as special function.
      sql/mysql_priv.h:
        Removed function which is no longer used.
      sql/set_var.cc:
        Now my_tz_find() accepts list of pre-opened time zone tables as last argument 
        and no longer needs pointer to current THD.
      sql/set_var.h:
        Exported sys_time_zone, which is now used in sql_yacc.yy for quick finding out if we are
        setting @@time_zone variable.
      sql/sql_base.cc:
        Moved propagation of pointers to open tables from global list to local select lists to
        open_and_lock_tables(), also added implicit usage of time zone tables as condition for
        such propagation.
      sql/sql_lex.cc:
        Added fake_time_zone_tables_list which is used to indicate that time zone tables are
        implicitly used in statement.
        st_select_lex_unit::create_total_list(): if time zone tables are implicitly used in
        statement add them to global tables list.
      sql/sql_lex.h:
        Added LEX::time_zone_tables_used member which is used to indicate that time zone tables 
        are implicitly used in this statement (by pointing to fake_time_zone_table_list) and 
        for holding pointer to those tables after they've been opened.
      sql/sql_parse.cc:
        We should also create global table list if statement uses time zone tables implicitly.
        Added initialization of LEX::time_zone_tables_used to mysql_query_init().
      sql/sql_prepare.cc:
        We should also create global table list if statement uses time zone tables implicitly.
      sql/sql_select.cc:
        Removed functions which are no longer used.
      sql/sql_yacc.yy:
        CONVERT_TZ() and @@time_zone variable are handled in special way since they implicitly 
        use time zone tables.
      sql/tztime.cc:
        Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
        If statement uses CONVERT_TZ() function or @@time_zone variable is set then it implicitly
        uses time zone tables. We need to open and lock such tables with all other tables of 
        such statement.
        
        All code responsible for opening table was removed from tz_load_from_db() and function was 
        renamed to tz_load_from_open_tables() (which uses list of pre-opened tables).
        We also have new functions for construction and initialization of table list of time
        zone tables.
        my_tz_find() now always require list of pre-opened time zone tables and no longer needs
        current THD. So we have to pre-open them in my_tz_init().
        Also now we try to open time zone tables only if they were found during startup.
      sql/tztime.h:
        New function for construction of table list of time zone tables my_tz_get_table_list().
        Now my_tz_find() requires list of pre-pened time zone tables instead of current thread.
      68d7b266
  23. 22 Jun, 2004 1 commit
    • unknown's avatar
      Fixed BUG#3486: FOUND_ROWS() fails inside stored procedure [and prepared statement]. · 3df8b829
      unknown authored
      mysql-test/r/ps.result:
        New test case for BUG#3486.
      mysql-test/t/ps.test:
        New test case for BUG#3486.
      sql/item_create.cc:
        Create an Item_func_found_rows() at parse time, not an Item_int.
      sql/item_func.cc:
        Added val_int() method for new Item_func_found_rows class.
      sql/item_func.h:
        New class Item_func_found_rows for FOUND_ROWS() function.
      sql/sql_select.cc:
        Don't reset thd->limit_found_rows too early, or FOUND_ROWS() wont work.
      3df8b829
  24. 18 Jun, 2004 1 commit
    • unknown's avatar
      WL#1264 "Per-thread time zone support infrastructure". · 6aaccbcb
      unknown authored
      Added basic per-thread time zone functionality (based on public
      domain elsie-code). Now user can select current time zone
      (from the list of time zones described in system tables).
      All NOW-like functions honor this time zone, values of TIMESTAMP
      type are interpreted as values in this time zone, so now
      our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
      LOCAL TIME ZONE (or proper PostgresSQL type).
        
      WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
      function".
        
      Fixed problems described in Bug #2336 (Different number of warnings 
      when inserting bad datetime as string or as number). This required
      reworking of datetime realted warning hadling (they now generated 
      at Field object level not in conversion functions).
        
      Optimization: Now Field class descendants use table->in_use member
      instead of current_thd macro.
      
      
      include/my_global.h:
        Added macro for reading of 32-bit ints stored in network order from
        unaligned memory location.
      include/mysqld_error.h:
        Added error-code for invalid timestamp warning and error-code
        for wrong or unknown time zone specification.
      libmysqld/Makefile.am:
        Added main per-thread time zone support file to libmysqld
      libmysqld/lib_sql.cc:
        Added initialization of time zones infrastructure to embedded server.
      mysql-test/r/connect.result:
        Updated test result since now mysql database contains more
        system tables.
      mysql-test/r/date_formats.result:
        Now when truncation occurs during conversion to datetime value we are producing Warnings 
        instead of Notes. Also we are giving more clear warnings about this in some cases.
      mysql-test/r/func_sapdb.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling.
      mysql-test/r/func_time.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling.
      mysql-test/r/select.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling. Also tweaked test a bit to made it less ambigious for reader.
      mysql-test/r/system_mysql_db.result:
        Updated test result because new system tables holding time zone descriptions were 
        added.
      mysql-test/r/timezone.result:
        Updated timezone.test to use new system variable which shows system time zone.
        Added test of warning which is produced if someone tries to store non-existing (due 
        falling into spring time-gap) datetime value into TIMESTAMP field.
      mysql-test/r/type_datetime.result:
        Separated and extended test of values and warnings produced for bad values stored in 
        DATETTIME fields.
      mysql-test/r/type_time.result:
        Now we are producing more consistent warning when we are truncating datetime value while
        storing it in TIME field.
      mysql-test/r/type_timestamp.result:
        Separated and extended test of values and warnings produced for bad
        values stored in TIMESTAMP fields.
      mysql-test/t/select.test:
        Updated test to make it less ambigous for reader.
      mysql-test/t/timezone.test:
        Updated timezone.test to use new system variable which shows system time zone.
        Added test of warning which is produced if someone tries to store non-existing (due 
        falling into spring time-gap) datetime value into TIMESTAMP field.
      mysql-test/t/type_datetime.test:
        Separated and extended test of values and warnings produced for bad
        values stored in DATETTIME fields.
      mysql-test/t/type_timestamp.test:
        Separated and extended test of values and warnings produced for bad
        values stored in TIMESTAMP fields.
      scripts/mysql_create_system_tables.sh:
        Added creation of tables with time zone descriptions.
        Also added descriptions of time zones used in tests.
      scripts/mysql_fix_privilege_tables.sql:
        Added mysql.time_zone* tables family.
      sql/Makefile.am:
        Added files implementing time zone support to server, also added
        rules for building of mysql_tzinfo_to_sql converter and test_time
        test.
      sql/field.cc:
        Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion.
        Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and
        any other Field to datetime conversion (now we are generating warnings no in lower
        level functions like in str_to_TIME() but in Field methods. This allows generate
        better and more consistent warnings and to reuse code of str_to_TIME() outside of
        server).
        
        Added 3rd parameter to set_warning() method to be able to not increment cut fields
        but still produce a warning. Also added set_datetime_warning() family of auxiliary 
        methods which allow easier generate datetime related warnings.
        Also replaced occurences of current_thd with table->in_use member, added
        asserts for catching all places there we need to set table->in_use
        accordingly. Renamed fix_datetime() function to number_to_TIME() and
        moved it to sql/time.cc there it fits better.
      sql/field.h:
        Added comment about places where we can use table->in_use member
        instead of current_thd.
        Added 3rd parameter to Field::set_warning() method and set_datetime_warning()
        family of methods.
      sql/field_conv.cc:
        Field::set_warning() method with 2 arguments was replaced with more 
        generic set_warning() method with 3 arguments.
      sql/ha_berkeley.cc:
        Now we set table->in_use for temporary tables so we have to use
        table->tmp_table for checking if table is temporary.
      sql/item.cc:
        Replaced calls to str_to_time() and str_to_TIME() funcs with their warning
        generating analogs.
      sql/item_create.cc:
        Added creation of CONVERT_TZ function as FUNC_ARG3.
      sql/item_create.h:
        Added creation of CONVERT_TZ function as FUNC_ARG3.
      sql/item_timefunc.cc:
        Added support of per-thread time zone to NOW-like and FROM_UNIXTIME,
        UNIX_TIMESTAMP functions. 
        Added support for CONVERT_TZ function.
        Removed call to str_to_timestamp function which caused non-optimal
        behavior in certain cases. Replaced calls to str_to_time() function 
        with its warning generating analog.
      sql/item_timefunc.h:
        Added support of per-thread time zone to NOW-like and
        FROM_UNIXTIME, UNIX_TIMESTAMP functions.
        Added support of CONVERT_TZ function.
      sql/lex.h:
        Added support of CONVERT_TZ function.
      sql/log.cc:
        Added support for replication of statements depending on time zone.
      sql/mysql_priv.h:
        Now including headers with per-thread time zone support functions
        and classes. Added portable replacement of time_t - my_time_t type. 
        Added time zone as one of query distinguishing parameters for
        query cache. 
        Fixed declarations of str_to_TIME, str_to_time and 
        my_system_gmt_sec (former my_gmt_sec) since now they have one more
        out parameter which informs about wrong datetime value or data 
        truncation during conversion.
        Added warning generating version of str_to_TIME() and str_to_time()
        functions.
        Thrown away str_to_datetime/timestamp functions since they are not
        needed any longer. Added number_to_TIME function.
      sql/mysqld.cc:
        Added per-thread time zone support initialization.
        Added new startup parameter --default-time-zone.
      sql/set_var.cc:
        Added support for per-thread time_zone variable.
        Renamed old timezone variable to system_time_zone.
      sql/set_var.h:
        Added support for per-thread time_zone variable.
      sql/share/czech/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/danish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/dutch/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/english/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/estonian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/french/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/german/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/greek/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/hungarian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/italian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/japanese/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/korean/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/norwegian-ny/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/norwegian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/polish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/portuguese/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/romanian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/russian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/serbian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/slovak/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/spanish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/swedish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/ukrainian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/slave.cc:
        In order to support replication of statements using time zones in 4.1 we should 
        ensure that both master and slave have same default time zone.
      sql/sql_base.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
        calls to Field::store or val_ methods).
      sql/sql_cache.cc:
        Added time zone as one more query distinguishing parameter
        for query cache.
      sql/sql_class.cc:
        Added THD::time_zone_used variable indicating that this query
        uses per thread time zone.
      sql/sql_class.h:
        Added per-thread time zone variable. Added THD::time_zone_used
        variable indicating that this query uses per thread time zone
        so if this is updating query the time zone should be logged to 
        binlog.
      sql/sql_insert.cc:
        We should set TABLE::in_use member pointing to thread which is called
        INSERT DELAYED and not to worker thread.
      sql/sql_load.cc:
        Field::set_warning() now has one more argument now.
      sql/sql_parse.cc:
        Resetting THD::time_zone_used variable in the end of query
        processing.
      sql/sql_select.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
        calls to Field::store or val_ methods).
      sql/sql_show.cc:
        Now using per thread time zone for extended show tables.
      sql/time.cc:
        Added support for per-thread time zones for TIMESTAMP type and
        reworked generation of warnings for TIMESTAMP and DATETIME types.
        (Introduced new TIME_to_timestamp() function. Removed hours 
        normalisation from former my_gmt_sec() since it was not working 
        and not used anywhere now, but breaks parameter constness, added
        to this function generation of warning if we are falling in spring 
        time-gap. Removed str_to_timestamp and str_to_datetime functions 
        which are no longer used. Moved fix_datetime function from
        sql/field.cc to this file as number_to_TIME() function. Added
        out parameter for str_to_TIME and str_to_time functions which
        indicates if value was truncated during conversion, removed direct 
        generation of warnings from this functions.)
      sql/unireg.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
          calls to Field::store or val_ methods).
      BitKeeper/etc/ignore:
        Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
      6aaccbcb
  25. 11 Jun, 2004 1 commit
  26. 04 Mar, 2004 2 commits
    • unknown's avatar
      UNHEX() function · 1530dd73
      unknown authored
      1530dd73
    • unknown's avatar
      Optimized GIS functions · afa6728a
      unknown authored
      heap/hp_delete.c:
        Added comments
      mysql-test/r/gis.result:
        Updated results after name changes (all results line are unchanged)
      mysql-test/r/show_check.result:
        Update test results after fix in hp_delete.cc
      mysql-test/t/gis.test:
        Changed table names to longer, hopefully non conflicting ones.
        Added missing drop table
      mysys/hash.c:
        Inendation cleanup
      mysys/tree.c:
        Updated comments
        Decrease tree->allocated on delete (for status)
      sql/field.cc:
        Added safety checking for GIS objects
      sql/gstream.cc:
        Added copyright message
        Made a lot of speed/space optimizations
        Changed class names to be MySQL compliant
      sql/gstream.h:
        Made a lot of speed/space optimizations
        Changed class names to be MySQL compliant
      sql/item_create.cc:
        Indentation fixup
      sql/item_geofunc.cc:
        Use new gis interface functions and new gis class names.
        Simple optimizations
        Indentation fixups
        Fixed a lot of unlikely but possible errors.
      sql/item_geofunc.h:
        Moved SRID_SIZE to spatial.h
      sql/spatial.cc:
        Added copyright message
        Made a lot of speed/space optimizations
        Changed class names to be MySQL compliant
      sql/spatial.h:
        Made a lot of speed/space optimizations
        Changed class names to be MySQL compliant
        Indentation fixes
        Use bool instead of int as result type for functions that only return 0 or 1
      sql/sql_string.cc:
        Simple optimizations
      sql/sql_string.h:
        Simple cleanups
      sql/structs.h:
        Added LEX_STRING_WITH_INIT (needed by spatial.cc)
      afa6728a
  27. 27 Feb, 2004 1 commit
    • unknown's avatar
      my_gethwaddr() for linux/freebsd · 1e191736
      unknown authored
      UUID() function
      
      
      BitKeeper/etc/ignore:
        Added mysys/test_gethwaddr to the ignore list
      include/my_sys.h:
        my_gethwaddr()
      mysys/Makefile.am:
        my_gethwaddr
      sql/item_create.cc:
        UUID() function
      sql/item_create.h:
        UUID() function
      sql/item_strfunc.cc:
        UUID() function
      sql/item_strfunc.h:
        UUID() function
      sql/lex.h:
        UUID() function
      sql/mysql_priv.h:
        UUID() function
      sql/mysqld.cc:
        UUID() function
      sql/sql_class.cc:
        cleanup
      1e191736
  28. 15 Jan, 2004 1 commit
    • unknown's avatar
      SCRUM: · 235f1a4d
      unknown authored
      WL#1163 (Making spatial code optional)
      Pack of changes to do in sql/ code.
      
      
      sql/field.cc:
        Spatial code #ifdef-ed
      sql/field.h:
        Spatial code #ifdef-ed
      sql/item_create.cc:
        Spatial code #ifdef-ed
      sql/item_create.h:
        Spatial code #ifdef-ed
      sql/item_geofunc.cc:
        Spatial code #ifdef-ed
      sql/item_geofunc.h:
        Spatial code #ifdef-ed
        GEOM_NEW implementation
      sql/lex.h:
        Code was significally modified to support optional group
        of functions
      sql/lex_symbol.h:
        SYM_GROUP structure presented
      sql/sql_table.cc:
        Spatial code #ifdef-ed
      sql/sql_yacc.yy:
        Several modifications to make spatial code optional
      sql/table.cc:
        Spatial code #ifdef-ed
      sql/unireg.cc:
        Spatial code #ifdef-ed
      235f1a4d
  29. 19 Dec, 2003 2 commits
    • unknown's avatar
      28ad1273
    • 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
  30. 08 Dec, 2003 1 commit
    • unknown's avatar
      WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions · 417354ea
      unknown authored
      Syntax for TIMESTAMPADD:
      
      TIMESTAMPADD(interval, integer_expression, datetime_expression)
      
      interval:= FRAC_SECOND | SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | 
      QUARTER | YEAR
      
      Supported SQL_TSI_  prefix  (like SQL_TSI_SECOND)
      
      Syntax for TIMESTAMPDIFF:
      
      TIMESTAMPDIFF(interval, datetime_expression1, datetime_expression2)
      
      interval:= FRAC_SECOND | SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | 
      QUARTER | YEAR
      
      Supported SQL_TSI_  prefix  (like SQL_TSI_SECOND)
      
      
      mysql-test/r/func_sapdb.result:
        Additional tests for timediff
      mysql-test/r/func_time.result:
        Tests for timestampadd, timestampdiff functions
      mysql-test/r/keywords.result:
        Test for new keywords
      mysql-test/t/func_sapdb.test:
        Additional tests for timediff
      mysql-test/t/func_time.test:
        Tests for timestampadd, timestampdiff functions
      mysql-test/t/keywords.test:
        Test for new keywords
      sql/item_create.cc:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/item_create.h:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/item_timefunc.cc:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/item_timefunc.h:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/lex.h:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/sql_yacc.yy:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      417354ea
  31. 18 Nov, 2003 1 commit
    • unknown's avatar
      changed name of bit on more descriptive (after rewie change) · 0d412844
      unknown authored
      sql/item_create.cc:
        changed name of bit on more descriptive
      sql/item_func.cc:
        changed name of bit on more descriptive
      sql/mysql_priv.h:
        changed name of bit on more descriptive
      sql/sql_lex.h:
        changed name of bit on more descriptive
      sql/sql_yacc.yy:
        changed name of bit on more descriptive
      0d412844
  32. 17 Nov, 2003 2 commits
    • unknown's avatar
      fixed using 'uncachable' tag and RAND_TABLE_BIT setting · 79533975
      unknown authored
      sql/item_create.cc:
        specify cause of uncachability
      sql/item_func.cc:
        specify cause of uncachability
      sql/item_subselect.cc:
        fixed setting RAND_TABLE_BIT
        specify cause of uncachability
      sql/item_subselect.h:
        used one field for all uncachability causes
      sql/mysql_priv.h:
        causes of uncachability
      sql/sql_lex.cc:
        specify cause of uncachability
      sql/sql_lex.h:
        used one field for all uncachability causes
      sql/sql_select.cc:
        used one field for all uncachability causes
      sql/sql_union.cc:
        used one field for all uncachability causes
      sql/sql_yacc.yy:
        specify cause of uncachability
      79533975
    • unknown's avatar
      WL#1253: LAST_DAY · ac584b24
      unknown authored
      mysql-test/r/func_time.result:
        Test for WL#1253: LAST_DAY
      mysql-test/t/func_time.test:
        Test for WL#1253: LAST_DAY
      ac584b24
  33. 03 Nov, 2003 1 commit
    • unknown's avatar
      Simplified 'wrong xxx name' error messages by introducing 'general' ER_WRONG_NAME error · bee5d9d4
      unknown authored
      Cleaned up (and disabled part of) date/time/datetime format patch. One can't anymore change default read/write date/time/formats.
      This is becasue the non standard datetime formats can't be compared as strings and MySQL does still a lot of datetime comparisons as strings
      Changed flag argument to str_to_TIME() and get_date() from bool to uint
      Removed THD from str_to_xxxx functions and Item class.
      Fixed core dump when doing --print-defaults
      Move some common string functions to strfunc.cc
      Dates as strings are now of type my_charset_bin instead of default_charset()
      Introduce IDENT_QUOTED to not have to create an extra copy of simple identifiers (all chars < 128)
      Removed xxx_FORMAT_TYPE enums and replaced them with the old TIMESTAMP_xxx enums
      Renamed some TIMESTAMP_xxx enums to more appropriate names
      Use defines instead of integers for date/time/datetime string lengths
      Added to build system and use the new my_strtoll10() function.
      
      
      
      BUILD/compile-pentium-valgrind-max:
        Remove double printing of warning
      VC++Files/libmysqld/libmysqld.dsp:
        Added strfunc.cc
      VC++Files/sql/mysqld.dsp:
        Added strfunc.cc
      VC++Files/sql/mysqldmax.dsp:
        Added strfunc.cc
      VC++Files/strings/strings.dsp:
        added my_strtoll10.c
      include/m_ctype.h:
        Removed MY_LEX_FOUND_IDENT (not used)
      include/m_string.h:
        Added my_strtoll10()
      include/mysqld_error.h:
        simplified 'wrong xxx name' error messages
      include/sql_state.h:
        simplified 'wrong xxx name' error messages
      libmysqld/Makefile.am:
        Added strfunc.cc
      mysql-test/mysql-test-run.sh:
        Simplified some options
        changed $@ to "$@" in an attempt to handle options with space (Didn't succeed;  Problem will disappear when mysql-test-run is rewritten in C)
      mysql-test/r/ctype_latin1_de.result:
        Added new tests
      mysql-test/r/ctype_recoding.result:
        Extended tests
      mysql-test/r/date_formats.result:
        Cleaned up tests
        Disabled some tests that can't yet be run
      mysql-test/r/func_compress.result:
        New error message
      mysql-test/r/rpl_temporary.result:
        Added new test
      mysql-test/t/create.test:
        Changed error numbers
      mysql-test/t/ctype_latin1_de.test:
        New tests
      mysql-test/t/ctype_recoding.test:
        Extended tests
      mysql-test/t/date_formats-master.opt:
        Removed datetime_format as we can't handle options with space in mysql-test-run
      mysql-test/t/date_formats.test:
        Cleaned up tests
        Disabled some tests that can't yet be run
      mysql-test/t/rpl_temporary.test:
        Added testing of open temporary table on slave shutdown
      mysql-test/t/symlink.test:
        Fixed error numbers
      mysys/default.c:
        Fixed core dump when doing --print-defaults
      sql/Makefile.am:
        Added strfunc.cc
      sql/derror.cc:
        Fixed compiler warning
      sql/field.cc:
        Changed argument to str_to_TIME() from bool to uint
        Removed THD argument from str_to_TIME()
        Moved find_enum() and find_set() to strfunc.cc
      sql/field.h:
        Changed type of last argument to get_date() to be able to handle more options
      sql/init.cc:
        Remove not used variable dayord
      sql/item.cc:
        Changed type of last argument to get_date() to be able to handle more options
        Removed THD* element from item.
        Don't use make_date_time() to generate date/time/datetimes
      sql/item.h:
        Changed type of last argument to get_date() to be able to handle more options
        Removed THD* from Item
      sql/item_create.cc:
        Indentation cleanup
      sql/item_func.cc:
        Use new find_type()
      sql/item_func.h:
        Changed type of last argument to get_date() to be able to handle more options
      sql/item_strfunc.h:
        space change
      sql/item_timefunc.cc:
        Changed month_names[] to be easier to use
        Moved check_names[] to strfunc.cc
        Added back old make_datetime() function
        Optimized extract_date_time()
        Use my_strtoll10() insetad of my_strntoll()
        Optimized make_date_time()
        Replaced short variable names with long ones.
        Use new functions make_time(), make_date() and make_datetime()
        Dates as strings are now of type my_charset_bin instead of default_charset()
        Changed Item_func_str_to_date() to by default return a date.
      sql/item_timefunc.h:
        Changed charset for date string from default_charset() to my_charset_bin
        Changed type of last argument to get_date() to be able to handle more options
        Use defines instead of integers for date/time/datetime string lengths
      sql/mysql_priv.h:
        Fixed/added new prototypes
      sql/mysqld.cc:
        Removed opt_datetime_format_names
        Cleaned up handling of date_time format handling. (Fixed core dump when mysqld had error on startup)
        Removed some unnecessary double init of collation variables
      sql/protocol.cc:
        Changed back protocol functions to always return dates in ISO format
      sql/set_var.cc:
        Added variables time_format, date_format and datetime_format
        This had to be recoded becasue checking was done in 'update' method and not in 'check' method.
      sql/set_var.h:
        Removed class sys_var_datetime_format() as this defined a variable (which doesn't work) instead of updating a variable
      sql/share/czech/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/danish/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/dutch/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/english/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/estonian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/french/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/german/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/greek/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/hungarian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/italian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/japanese/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/korean/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/norwegian-ny/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/norwegian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/polish/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/portuguese/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/romanian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/russian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/serbian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/slovak/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/spanish/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/swedish/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/share/ukrainian/errmsg.txt:
        simplified 'wrong xxx name' error messages
      sql/sql_base.cc:
        Use new find_type()
      sql/sql_class.cc:
        Allocate/free date_time format variables
      sql/sql_class.h:
        Define datetime_format variables
      sql/sql_db.cc:
        Use new ER_WRONG_NAME error
      sql/sql_lex.cc:
        Change lex to generate IDENT_QUOTED for quoted identifiers or identifers that are using characters > 128.
        This enabled us to not have to copy and convert the identifier to utf8 for simpe identifiers
      sql/sql_parse.cc:
        Use new ER_WRONG_NAME error
        Use new find_type() function
      sql/sql_prepare.cc:
        Use new defines
      sql/sql_table.cc:
        Use new ER_WRONG_NAME error
      sql/sql_yacc.yy:
        Don't copy and convert simple identifiers to utf8.
        Replace __FORMAT_TYPE defines with TIMESTAMP... defines
      sql/structs.h:
        Renamed DATETIME_FORMAT to DATE_TIME format to indicate that it's for date/time/datetime formats
        Renamed WRONT_TIMESTAMP_FULL to TIMESTAMP_DATETIME_ERROR and TIMESTAMP_FULL to TIMESTAMP_DATETIME
        Added KNOWN_DATE_TIME_FORMAT struct for Item_func_get_format
      sql/time.cc:
        Prepare str_to_TIME and str_to_time() for general date/time handling
        Removed THD from str_to... functions
        Renamed date/time/datetime functions to use 'date_time' instead of 'datetime'
        Added functions to make and copy DATE_TIME_FORMAT's
        Added trivial functions 'make_time()', 'make_date()' and 'make_datetime()'
      strings/Makefile.am:
        Added my_strtoll10()
      strings/ctype-bin.c:
        Cleared upper part of binary state map to be able to easily identify simple identifiers
      strings/my_vsnprintf.c:
        F
      bee5d9d4
  34. 31 Oct, 2003 1 commit
    • unknown's avatar
      amall fix · d6aacb9e
      unknown authored
      mysql-test/r/derived.result:
        fixed results after merge
      mysql-test/r/func_in.result:
        small fix to amke all names uniform
      mysql-test/r/func_math.result:
        forgot to change
      sql/item.cc:
        fix
      sql/item_create.cc:
        small fix to amke all names uniform
      d6aacb9e
  35. 30 Oct, 2003 1 commit
    • unknown's avatar
      added code covarage for functions convert(), nullif(), crc32(),... · 87e6c2ba
      unknown authored
      added code covarage for functions convert(), nullif(), crc32(), is_used_lock(), char_lengtrh(), bit_xor()
      added string length for more speed
      made code covarage for print() method of Item
      fixed printability of some items (SCRUM) (WL#1274)
      
      
      mysql-test/r/auto_increment.result:
        print() code coverage
      mysql-test/r/bench_count_distinct.result:
        print() code coverage
      mysql-test/r/case.result:
        print() code coverage
      mysql-test/r/cast.result:
        print() code coverage
      mysql-test/r/ctype_collate.result:
        print() code coverage
      mysql-test/r/ctype_many.result:
        convert with 3 arguments code covarage
        print() code coverage
      mysql-test/r/ctype_utf8.result:
        char_length code coverage
      mysql-test/r/date_formats.result:
        print() code coverage
      mysql-test/r/fulltext.result:
        print() code coverage
      mysql-test/r/func_compress.result:
        print() code coverage
      mysql-test/r/func_gconcat.result:
        print() code coverage
      mysql-test/r/func_group.result:
        bit_xor() code coverage
        print() code coverage
      mysql-test/r/func_if.result:
        nullif() code coverage
        print() code coverage
      mysql-test/r/func_in.result:
        print() code coverage
      mysql-test/r/func_math.result:
        print() code coverage
      mysql-test/r/func_op.result:
        print() code coverage
      mysql-test/r/func_regexp.result:
        print() code coverage
      mysql-test/r/func_set.result:
        print() code coverage
      mysql-test/r/func_str.result:
        crc32() code coverage
        print() code coverage
      mysql-test/r/func_system.result:
        print() code coverage
      mysql-test/r/func_test.result:
        print() code coverage
      mysql-test/r/func_time.result:
        print() code coverage
      mysql-test/r/group_by.result:
        print() code coverage
      mysql-test/r/having.result:
        print() code coverage
      mysql-test/r/insert_update.result:
        print() code coverage
      mysql-test/r/null.result:
        print() code coverage
      mysql-test/r/olap.result:
        print() code coverage
      mysql-test/r/query_cache.result:
        print() code coverage
      mysql-test/r/row.result:
        print() code coverage
      mysql-test/r/rpl000001.result:
        print() code coverage
      mysql-test/r/rpl_get_lock.result:
        print() code coverage
      mysql-test/r/rpl_master_pos_wait.result:
        print() code coverage
      mysql-test/r/select.result:
        print() code coverage
      mysql-test/r/subselect.result:
        print() code coverage
      mysql-test/r/type_blob.result:
        print() code coverage
      mysql-test/r/varbinary.result:
        print() code coverage
      mysql-test/r/variables.result:
        print() code coverage
      mysql-test/t/auto_increment.test:
        print() code coverage
      mysql-test/t/bench_count_distinct.test:
        print() code coverage
      mysql-test/t/case.test:
        print() code coverage
      mysql-test/t/cast.test:
        print() code coverage
      mysql-test/t/ctype_collate.test:
        print() code coverage
      mysql-test/t/ctype_many.test:
        convert with 3 arguments code covarage
        print() code coverage
      mysql-test/t/ctype_utf8.test:
        char_length code coverage
      mysql-test/t/date_formats.test:
        print() code coverage
      mysql-test/t/fulltext.test:
        print() code coverage
      mysql-test/t/func_compress.test:
        print() code coverage
      mysql-test/t/func_gconcat.test:
        print() code coverage
      mysql-test/t/func_group.test:
        bit_xor() code coverage
        print() code coverage
      mysql-test/t/func_if.test:
        nullif() code coverage
        print() code coverage
      mysql-test/t/func_in.test:
        print() code coverage
      mysql-test/t/func_math.test:
        print() code coverage
      mysql-test/t/func_op.test:
        print() code coverage
      mysql-test/t/func_regexp.test:
        print() code coverage
      mysql-test/t/func_set.test:
        print() code coverage
      mysql-test/t/func_str.test:
        crc32() code covarage
        print() code coverage
      mysql-test/t/func_system.test:
        print() code coverage
      mysql-test/t/func_test.test:
        print() code coverage
      mysql-test/t/func_time.test:
        print() code coverage
      mysql-test/t/group_by.test:
        print() code coverage
      mysql-test/t/having.test:
        print() code coverage
      mysql-test/t/insert_update.test:
        print() code coverage
      mysql-test/t/null.test:
        print() code coverage
      mysql-test/t/olap.test:
        print() code coverage
      mysql-test/t/query_cache.test:
        print() code coverage
      mysql-test/t/row.test:
        print() code coverage
      mysql-test/t/rpl000001.test:
        print() code coverage
      mysql-test/t/rpl_get_lock.test:
        print() code coverage
      mysql-test/t/rpl_master_pos_wait.test:
        print() code coverage
      mysql-test/t/select.test:
        print() code coverage
      mysql-test/t/type_blob.test:
        print() code coverage
      mysql-test/t/varbinary.test:
        print() code coverage
      mysql-test/t/variables.test:
        print() code coverage
      sql/item.cc:
        added string length for more speed
        layout fix
        fixed string printability
      sql/item.h:
        added string length for more speed
      sql/item_cmpfunc.cc:
        added string length for more speed
      sql/item_cmpfunc.h:
        fixed printability
      sql/item_create.cc:
        fixed printability
      sql/item_func.cc:
        fixed printability
        added string length for more speed
      sql/item_func.h:
        fixed printability
      sql/item_strfunc.cc:
        fixed printability
        added string length for more speed
      sql/item_strfunc.h:
        fixed printability
      sql/item_subselect.cc:
        added string length for more speed
      sql/item_sum.cc:
        added string length for more speed
      sql/item_timefunc.cc:
        added string length for more speed
      sql/item_timefunc.h:
        fixed printability
      sql/item_uniq.h:
        added string length for more speed
      sql/key.cc:
        added string length for more speed
      sql/sql_lex.cc:
        added string length for more speed
      sql/sql_parse.cc:
        after merge fix
      sql/sql_repl.cc:
        string changed with character for more speed
      sql/sql_select.cc:
        added string length for more speed
      sql/sql_show.cc:
        added string length for more speed
      87e6c2ba
  36. 20 Oct, 2003 1 commit