An error occurred fetching the project authors.
  1. 22 Nov, 2010 1 commit
  2. 13 Aug, 2010 2 commits
    • Georgi Kodinov's avatar
      merge · 53e0b31e
      Georgi Kodinov authored
      53e0b31e
    • Georgi Kodinov's avatar
      Bug #55615 and bug #55564 · 4bf81165
      Georgi Kodinov authored
      An user assignment variable expression that's 
      evaluated in a logical expression context 
      (Item::val_bool()) can be pre-calculated in a 
      temporary table for GROUP BY.
      However when the expression value is used after the
      temp table creation it was re-evaluated instead of
      being read from the temp table due to a missing 
      val_bool_result() method.
      Fixed by implementing the method.
      4bf81165
  3. 05 May, 2010 1 commit
    • Alexander Nozdrin's avatar
      Patch for Bug#50511 (Sometimes wrong handling of user variables containing NULL). · 0a032dea
      Alexander Nozdrin authored
            
      The bug happened under the following condition:
        - there was a user variable of type REAL, containing NULL value
        - there was a table with a NOT_NULL column of any type but REAL, having
          default value (or auto increment);
        - a row was inserted into the table with the user variable as value.
          A warning was emitted here.
      
      The problem was that handling of NULL values of REAL type was not properly
      implemented: it didn't expect that REAL NULL value can be assigned to other
      data type.
      
      Basically, the problem was that set_field_to_null() was used instead of
      set_field_to_null_with_conversions().
      
      The fix is to use the right function, or more generally, to allow conversion of
      REAL NULL values to other data types.
      0a032dea
  4. 22 Dec, 2009 2 commits
    • Sergey Glukhov's avatar
      Bug#47371 reference by same column name · 081bcb3b
      Sergey Glukhov authored
      At the end of execution top level join execution
      we cleanup this join with true argument.
      It leads to underlying join cleanup(subquery) with true argument too
      and to tmp_table_param->field array cleanup which is required later.
      The problem is that Item_func_set_user_var does not set
      result_filed which leads to unnecessary repeated excution of subquery
      on final stage.
      The fix is to set result_field for Item_func_set_user_var.
      
      
      mysql-test/r/count_distinct.result:
        test result
      mysql-test/r/user_var.result:
        test result
      mysql-test/t/count_distinct.test:
        test case
      mysql-test/t/user_var.test:
        test case
      sql/item_func.cc:
        At the end of execution top level join execution
        we cleanup this join with true argument.
        It leads to underlying join cleanup(subquery) with true argument too
        and to tmp_table_param->field array cleanup which is required later.
        The problem is that Item_func_set_user_var does not set
        result_filed which leads to unnecessary repeated excution of subquery
        on final stage.
        The fix is to set result_field for Item_func_set_user_var.
      081bcb3b
    • Sergei Golubchik's avatar
      WL#4738 streamline/simplify @@variable creation process · 1ad5bb1a
      Sergei Golubchik authored
      Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
      Bug#20415 Output of mysqld --help --verbose is incomplete
      Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
      Bug#32902 plugin variables don't know their names
      Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
      Bug#34829 No default value for variable and setting default does not raise error
      Bug#34834 ? Is accepted as a valid sql mode
      Bug#34878 Few variables have default value according to documentation but error occurs  
      Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
      Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
      Bug#40988 log_output_basic.test succeeded though syntactically false.
      Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
      Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations 
      Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
      Bug#44797 plugins w/o command-line options have no disabling option in --help
      Bug#46314 string system variables don't support expressions
      Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
      Bug#46586 When using the plugin interface the type "set" for options caused a crash.
      Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
      Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
      Bug#49417 some complaints about mysqld --help --verbose output
      Bug#49540 DEFAULT value of binlog_format isn't the default value
      Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
      Bug#49644 init_connect and \0
      Bug#49645 init_slave and multi-byte characters
      Bug#49646 mysql --show-warnings crashes when server dies
      
      
      CMakeLists.txt:
        Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
      client/mysql.cc:
        don't crash with --show-warnings when mysqld dies
      config/ac-macros/plugins.m4:
        Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
      include/my_getopt.h:
        comments
      include/my_pthread.h:
        fix double #define
      mysql-test/mysql-test-run.pl:
        run sys_vars suite by default
        properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0
        escape gdb command line arguments
      mysql-test/suite/sys_vars/r/rpl_init_slave_func.result:
        init_slave+utf8 bug
      mysql-test/suite/sys_vars/t/rpl_init_slave_func.test:
        init_slave+utf8 bug
      mysys/my_getopt.c:
        Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
        Bug#46586 When using the plugin interface the type "set" for options caused a crash.
        Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
      mysys/typelib.c:
        support for flagset
      sql/ha_ndbcluster.cc:
        backport from telco tree
      sql/item_func.cc:
        Bug#49644 init_connect and \0
        Bug#49645 init_slave and multi-byte characters
      sql/sql_builtin.cc.in:
        Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
      sql/sql_plugin.cc:
        Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
        Bug#32902 plugin variables don't know their names
        Bug#44797 plugins w/o command-line options have no disabling option in --help
      sql/sys_vars.cc:
        all server variables are defined here
      storage/myisam/ft_parser.c:
        remove unnecessary updates of param->quot
      storage/myisam/ha_myisam.cc:
        myisam_* variables belong here
      strings/my_vsnprintf.c:
        %o and %llx
      unittest/mysys/my_vsnprintf-t.c:
        %o and %llx tests
      vio/viosocket.c:
        bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
      1ad5bb1a
  5. 18 Mar, 2009 1 commit
    • Joerg Bruehe's avatar
      This is a backport from 5.1.32 into 5.1.31sp1. · 1b5814d3
      Joerg Bruehe authored
      The original fix was done by Gleb Shchepa on 2009-01-21
      All comments are copied from the original fix:
      
      
      Bug#42188: crash and/or memory corruption with user variables 
                 in trigger
      
      Interchangeable calls to the mysql_change_user client function 
      and invocations of a trigger changing some user variable caused 
      a memory corruption and a crash.
      
      The mysql_change_user API call forces TDH::cleanup() on a server 
      that frees user variable entries.
      However it didn't reset Item_func_set_user_var::entry to NULL 
      because Item_func_set_user_var::cleanup() was not overloaded.
      So, Item_func_set_user_var::entry held a pointer to freed memory,
      that caused a crash.
      
      The Item_func_set_user_var::cleanup method has been overloaded
      to cleanup the Item_func_set_user_var::entry field.
      
      mysql-test/r/user_var.result:
        Added test case for bug #42188.
      mysql-test/t/user_var.test:
        Added test case for bug #42188
        and
        After-push test file update (see bug 42321)
      sql/item_func.cc:
        Bug#42188: crash and/or memory corruption with user variables
                   in trigger
        
        The Item_func_set_user_var::cleanup method has been overloaded
        to cleanup the Item_func_set_user_var::entry field.
      sql/item_func.h:
        Bug#42188: crash and/or memory corruption with user variables
                   in trigger
        
        The Item_func_set_user_var::cleanup method has been overloaded
        to cleanup the Item_func_set_user_var::entry field.
      1b5814d3
  6. 24 Feb, 2009 1 commit
    • Ramil Kalimullin's avatar
      Fix for bug#42009: SELECT into variable gives different results to direct SELECT · bd414485
      Ramil Kalimullin authored
      Problem: storing "SELECT ... INTO @var ..." results in variables we used val_xxx()
      methods which returned results of the current row. 
      So, in some cases (e.g. SELECT DISTINCT, GROUP BY or HAVING) we got data
      from the first row of a new group (where we evaluate a clause) instead of
      data from the last row of the previous group.
      
      Fix: use val_xxx_result() counterparts to get proper results.
      
      
      mysql-test/r/distinct.result:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - results adjusted.
      mysql-test/r/user_var.result:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - test result.
      mysql-test/t/user_var.test:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - test case.
      sql/item_func.cc:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - Item_func_set_user_var::save_item_result() added to evaluate and store 
            an item's result into a user variable.
      sql/item_func.h:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - Item_func_set_user_var::save_item_result() added to evaluate and store 
            an item's result into a user variable.
      sql/sql_class.cc:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - use Item_func_set_user_var::save_item_result() to store results into user 
            variables.
      bd414485
  7. 23 Jan, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug#42188: crash and/or memory corruption with user variables · 93991b6b
      Gleb Shchepa authored
                 in trigger
      
      Interchangeable calls to the mysql_change_user client function
      and invocations of a trigger changing some user variable caused
      a memory corruption and a crash.
      
      The mysql_change_user API call forces TDH::cleanup() on a server
      that frees user variable entries.
      However it didn't reset Item_func_set_user_var::entry to NULL
      because Item_func_set_user_var::cleanup() was not overloaded.
      So, Item_func_set_user_var::entry held a pointer to freed memory,
      that caused a crash.
      
      The Item_func_set_user_var::cleanup method has been overloaded
      to cleanup the Item_func_set_user_var::entry field.
      
      
      mysql-test/r/user_var.result:
        Added test case for bug #42188.
      mysql-test/t/user_var.test:
        Added test case for bug #42188.
      sql/item_func.cc:
        Bug#42188: crash and/or memory corruption with user variables
                   in trigger
        
        The Item_func_set_user_var::cleanup method has been overloaded
        to cleanup the Item_func_set_user_var::entry field.
      sql/item_func.h:
        Bug#42188: crash and/or memory corruption with user variables
                   in trigger
        
        The Item_func_set_user_var::cleanup method has been overloaded
        to cleanup the Item_func_set_user_var::entry field.
      93991b6b
  8. 18 Sep, 2008 1 commit
    • Gleb Shchepa's avatar
      Bug#26020: User-Defined Variables are not consistent with · e9cb71fc
      Gleb Shchepa authored
                 columns data types
      
      The "SELECT @lastId, @lastId := Id FROM t" query returns
      different result sets depending on the type of the Id column
      (INT or BIGINT).
      
      Note: this fix doesn't cover the case when a select query
      references an user variable and stored function that
      updates a value of that variable, in this case a result
      is indeterminate.
      
      
      The server uses incorrect assumption about a constantness of
      an user variable value as a select list item: 
      
      The server caches a last query number where that variable
      was changed and compares this number with a current query
      number. If these numbers are different, the server guesses,
      that the variable is not updating in the current query, so
      a respective select list item is a constant. However, in some
      common cases the server updates cached query number too late.
      
      
      The server has been modified to memorize user variable
      assignments during the parse phase to take them into account
      on the next (query preparation) phase independently of the
      order of user variable references/assignments in a select
      item list.
      
      
      mysql-test/r/user_var.result:
        Added test case for bug #26020.
      mysql-test/t/user_var.test:
        Added test case for bug #26020.
      sql/item_func.cc:
        An update of entry and update_query_id variables has been
        moved from Item_func_set_user_var::fix_fields() to a separate
        method, Item_func_set_user_var::set_entry().
      sql/item_func.h:
        1. The Item_func_set_user_var::set_entry() method has been
        added to update Item_func_set_user_var::entry.
        
        2. The Item_func_set_user_var::entry_thd field has beend
        added to update Item_func_set_user_var::entry only when
        needed.
      sql/sql_base.cc:
        Fix: setup_fiedls() calls Item_func_set_user_var::set_entry()
        for all items from the thd->lex->set_var_list before the first
        call of ::fix_fields().
      sql/sql_lex.cc:
        The lex_start function has been modified to reset
        the st_lex::set_var_list list.
      sql/sql_lex.h:
        New st_lex::set_var_list field has been added to
        memorize all user variable assignments in the current
        select query.
      sql/sql_yacc.yy:
        The variable_aux rule has been modified to memorize
        in-query user variable assignments in the
        st_lex::set_var_list list.
      e9cb71fc
  9. 07 Dec, 2007 1 commit
    • unknown's avatar
      Bug#32482: Crash for a query with ORDER BY a user variable. · 0ad7fc58
      unknown authored
      The Item_func_set_user_var::register_field_in_read_map() did not check 
      that the result_field was null.This caused server crashes for queries that
      required order by such a field and were executed without using a temporary
      table.
      
      The Item_func_set_user_var::register_field_in_read_map() now checks the
      result_field to be not null.
      
      
      mysql-test/t/user_var.test:
        Added a test case for the bug#32482: Crash for a query with ORDER BY a user variable.
      mysql-test/r/user_var.result:
        Added a test case for the bug#32482: Crash for a query with ORDER BY a user variable.
      sql/item_func.cc:
        Bug#32482: Crash for a query with ORDER BY a user variable.
        The Item_func_set_user_var::register_field_in_read_map() now checks the
        result_field to be not null.
      0ad7fc58
  10. 17 Nov, 2007 1 commit
    • unknown's avatar
      Fix for bug #32260: User variables in query cause server crash · 011eb3df
      unknown authored
        
      Problem: there's no guarantee that the user variable item's result_field
      is assigned when we're adjusting its table read map.
        
      Fix: check the result_field before using it.
      
      
      mysql-test/r/user_var.result:
        Fix for bug #32260: User variables in query cause server crash
          - test result.
      mysql-test/t/user_var.test:
        Fix for bug #32260: User variables in query cause server crash
          - test case.
      sql/item_func.cc:
        Fix for bug #32260: User variables in query cause server crash
          - using the result_field ensure it is set.
      011eb3df
  11. 03 Jun, 2007 2 commits
    • unknown's avatar
      user_var.result: · e19dcfa9
      unknown authored
        Corrected test case result for the bug#28494.
      item_func.h, item_func.cc:
        Corrected function names after fix for the bug#28494.
      
      
      mysql-test/r/user_var.result:
        Corrected test case result for the bug#28494.
      sql/item_func.h:
        Corrected function names after fix for the bug#28494.
      sql/item_func.cc:
        Corrected function names after fix for the bug#28494.
      e19dcfa9
    • unknown's avatar
      user_var.result, user_var.test: · 4ef02860
      unknown authored
        Extended test case for the bug#28494.
      
      
      mysql-test/t/user_var.test:
        Extended test case for the bug#28494.
      mysql-test/r/user_var.result:
        Extended test case for the bug#28494.
      4ef02860
  12. 02 Jun, 2007 1 commit
    • unknown's avatar
      Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. · 8ab1830f
      unknown authored
      This is an additional fix.
      Item::val_xxx methods are supposed to use original data source and
      Item::val_xxx_result methods to use the item's result field. But for the
      Item_func_set_user_var class val_xxx_result methods were mapped to val_xxx
      methods. This leads, in particular, to producing bad sort keys and thus
      wrong order of the result set of queries with group by/order by clauses.
      
      The set of val_xxx_result methods is added to the Item_func_set_user_var
      class. It's the same as the val_xxx set of method but uses the result_field
      to return a value.
      
      
      mysql-test/t/user_var.test:
        Corrected test case for hte bug#28494.
      mysql-test/r/user_var.result:
        Corrected test case for hte bug#28494.
      sql/item_func.cc:
        Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
        The set of val_xxx_result methods is added to the Item_func_set_user_var
        class. It's the same as the val_xxx set of method but uses the result_field
        to return a value.
      sql/item_func.h:
        Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
        The set of val_xxx_result methods is added to the Item_func_set_user_var
        class.
      8ab1830f
  13. 01 Jun, 2007 1 commit
  14. 31 May, 2007 1 commit
    • unknown's avatar
      Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. · b4a35cd7
      unknown authored
      The end_update() function uses the Item::save_org_in_field() function to
      save original values of items into the group buffer. But for the 
      Item_func_set_user_var this method was mapped to the save_in_field method.
      The latter function wrongly decides to use the result_field. This leads to
      saving incorrect value in the grouping buffer and wrong result of the whole
      query.
      
      The can_use_result_field argument of the bool type is added to the
      Item_func_set_user_var::save_in_field() function. If it is set to FALSE
      then the item's result field won't be used. Otherwise it will be detected
      whether the result field will be used (old behaviour).
      Two wrapping functions for the function above are added to the 
      Item_func_set_user_var class:
      the save_in_field(Field *field, bool no_conversions) - it calls the above
      function with the can_use_result_field set to TRUE.
      the save_org_in_field(Field *field) - same, but the can_use_result_field
      is set to FALSE.
      
      
      mysql-test/t/user_var.test:
        Added a test case for the bug#28494: Grouping by Item_func_set_user_var
        produces incorrect result.
      mysql-test/r/user_var.result:
        Added a test case for the bug#28494: Grouping by Item_func_set_user_var
        produces incorrect result.
      sql/item_func.cc:
        Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
        The can_use_result_field argument of the bool type is added to the
        Item_func_set_user_var::save_in_field() function. If it is set to FALSE
        then the item's result field won't be used. Otherwise it will be detected
        whether the result field will be used (old behaviour).
      sql/item_func.h:
        Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
        The can_use_result_field argument of the bool type is added to the
        Item_func_set_user_var::save_in_field() function.
        Two wrapping functions for the function above are added to the 
        Item_func_set_user_var class:
        the save_in_field(Field *field, bool no_conversions) - it calls the above
        function with the can_use_result_field set to TRUE.
        the save_org_in_field(Field *field) - same, but the can_use_result_field
        is set to FALSE.
      b4a35cd7
  15. 18 May, 2007 1 commit
    • unknown's avatar
      Bug#26277 User variable returns one type in SELECT @v and other for CREATE as SELECT @v · 755ae21b
      unknown authored
      - Adding variable m_cached_result_type to keep the variable type consistent
        during the execution of a statement.
      - Before each result set is returned to the client the description of each
        column is sent as meta data.
        Previously the result type for a column could change if the hash variable
        entry changed between statements. This caused the result set of the query
        to alternate column types in certain cases which is not supported by MySQL
        client-server protocol. Example:
        Previously this sequence:
          SET @A:=1;
          SELECT @A:="text", @A;
        would return "text", "text";
       
        After the change the SELECT returns "text", 0
        The reson for this is that previously the result set from 'SELECT @A;'
        would always be of the type STRING, whereas now the type of the variable
        is taken from the last SET statement. However, 'SELECT @A:="text"' will
        return type of STRING since the right side of the assignment is used.
      
      
      mysql-test/r/ps_2myisam.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_3innodb.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_4heap.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_5merge.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_7ndb.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/sp-vars.result:
        Added test case. Previously variables could change their variable type during 
        the execution of a statement.
        Which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/r/type_date.result:
        This test case result is changed because it is no longer allowed for user
        variables to change their variable type during the execution of a statement.
        The determination of which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/r/user_var.result:
        This test case result is changed because it is no longer allowed for user
        variables to change their variable type during the execution of a statement.
        The determination of which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/t/sp-vars.test:
        Added test case. Previously variables could change their variable type during 
        the execution of a statement.
        Which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/t/type_date.test:
        This test case result is changed because it is no longer allowed for user
        variables to change their variable type during the execution of a statement.
        The determination of which variable type to use in the statement is specified in
        any previous statement.
      sql/item_func.cc:
        Adding variable m_cached_result_type to keep the variable type consistent
        during the execution of a statement.
        Previously the result type could change if the hash variable entry changed
        between statements. This caused the result set of the query to alternate
        column types in certain cases.
      sql/item_func.h:
        Adding variable m_cached_result_type to keep the variable type consistent
        during the execution of a statement.
        Previously the result type could change if the hash variable entry changed
        between statements. This caused the result set of the query to alternate
        column types in certain cases.
      755ae21b
  16. 09 Jan, 2007 1 commit
    • unknown's avatar
      Fixed bug#16861: User defined variable can have a wrong value if a tmp table was · f094fe55
      unknown authored
      used.
      
      The Item::save_in_field() function is called from fill_record() to fill the 
      new row with data while execution of the CREATE TABLE ... SELECT statement.
      Item::save_in_field() calls val_xxx() methods in order to get values.
      val_xxx() methods do not take into account the result field. Due to this
      Item_func_set_user_var::val_xxx() methods returns values from the original
      table, not from the temporary one.
      
      The save_in_field() member function is added to the Item_func_set_user_var
      class. It detects whether the result field should be used and properly updates
      the value of the user variable.
      
      
      sql/item_func.cc:
        Bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Added the save_in_field() member function to the Item_func_set_user_var class.
      sql/item_func.h:
        Bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Added the save_in_field() member function to the Item_func_set_user_var class.
      mysql-test/r/user_var.result:
        Extended the test case for bug#18681: User defined variable can have a wrong value if
        a tmp table was used.
      mysql-test/t/user_var.test:
        Extended the test case for bug#18681: User defined variable can have a wrong value if
        a tmp table was used.
      f094fe55
  17. 04 Oct, 2006 1 commit
    • unknown's avatar
      Bug #19024- SHOW COUNT(*) WARNINGS not return Errors · aaef575f
      unknown authored
        
      The server variable warning_count should include the number of warnings, errors and notes according to the manual
      
      
      mysql-test/r/user_var.result:
        Added warning_count results.
      mysql-test/t/user_var.test:
        Added test case for warning_count.
      sql/set_var.cc:
        Added number errors to warning_count.
      aaef575f
  18. 13 Sep, 2006 1 commit
    • unknown's avatar
      Cset exclude: kaa@polly.local|ChangeSet|20060912122540|09861 · 418ae41b
      unknown authored
      Cset exclude: kaa@polly.local|ChangeSet|20060908100829|09983
      
      
      sql/item_cmpfunc.cc:
        Exclude
      sql/item_cmpfunc.h:
        Exclude
      sql/item_func.cc:
        Exclude
      sql/item_func.h:
        Exclude
      sql/log_event.cc:
        Exclude
      sql/sql_class.h:
        Exclude
      mysql-test/r/case.result:
        Exclude
      mysql-test/r/func_if.result:
        Exclude
      mysql-test/r/func_test.result:
        Exclude
      mysql-test/r/user_var.result:
        Exclude
      mysql-test/t/case.test:
        Exclude
      mysql-test/t/func_if.test:
        Exclude
      mysql-test/t/func_test.test:
        Exclude
      mysql-test/t/user_var.test:
        Exclude
      418ae41b
  19. 12 Sep, 2006 1 commit
    • unknown's avatar
      Post-review fixes for bug #20924 · 5aa6e861
      unknown authored
      mysql-test/r/case.result:
        Post-review fix for bug #20924
      mysql-test/r/func_if.result:
        Post-review fix for bug #20924
      mysql-test/r/func_test.result:
        Post-review fix for bug #20924
      mysql-test/r/user_var.result:
        Post-review fix for bug #20924
      mysql-test/t/case.test:
        Post-review fix for bug #20924
      mysql-test/t/func_if.test:
        Post-review fix for bug #20924
      mysql-test/t/func_test.test:
        Post-review fix for bug #20924
      mysql-test/t/user_var.test:
        Post-review fix for bug #20924
      sql/item_func.cc:
        Post-review fix for bug #20924
      sql/item_func.h:
        Post-review fix for bug #20924
      sql/log_event.cc:
        Post-review fix for bug #20924
      5aa6e861
  20. 08 Sep, 2006 1 commit
    • unknown's avatar
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions · f64483cb
      unknown authored
      - Honor unsigned_flag in the corresponding functions
      - Use compare_int_signed_unsigned()/compare_int_unsigned_signed() instead of explicit comparison in GREATEST() and LEAST()
      
      
      mysql-test/r/case.result:
        Added test case for bug #20924
      mysql-test/r/func_if.result:
        Added test case for bug #20924
      mysql-test/r/func_test.result:
        Added test case for bug #20924
      mysql-test/r/user_var.result:
        Added test case for bug #20924
      mysql-test/t/case.test:
        Added test case for bug #20924
      mysql-test/t/func_if.test:
        Added test case for bug #20924
      mysql-test/t/func_test.test:
        Added test case for bug #20924
      mysql-test/t/user_var.test:
        Added test case for bug #20924
      sql/item_cmpfunc.cc:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max
        - Fixed IFNULL(), IF(), CASE() and COALESCE()
      sql/item_cmpfunc.h:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max
      sql/item_func.cc:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        Fixed LEAST(), GREATEST() and "SET @A=..." parts
      sql/item_func.h:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        Fixed "SET @A=..." part
      sql/sql_class.h:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        Fixed "SET @A=..." part
      f64483cb
  21. 22 Aug, 2006 1 commit
    • unknown's avatar
      Fixed bug#16861: User defined variable can have a wrong value if a tmp table was · c623e54f
      unknown authored
      used.
      
      Sorting by RAND() uses a temporary table in order to get a correct results.
      User defined variable was set during filling the temporary table and later
      on it is substituted for its value from the temporary table. Due to this
      it contains the last value stored in the temporary table.
      
      Now if the result_field is set for the Item_func_set_user_var object it 
      updates variable from the result_field value when being sent to a client.
      
      The Item_func_set_user_var::check() now accepts a use_result_field
      parameter. Depending on its value the result_field or the args[0] is used
      to get current value.
      
      
      mysql-test/r/user_var.result:
        Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
      mysql-test/t/user_var.test:
        Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
      sql/item_func.cc:
        Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Now if the result_field is set for the Item_func_set_user_var object it 
        updates variable from the result_field value when being sent to a client.
        
        The Item_func_set_user_var::check() now accepts a use_result_field
        parameter. Depending on its value the result_field or the args[0] is used
        to get current value.
      sql/item_func.h:
        Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Added a new SUSERVAR_FUNC function type.
        Updated the Item_func_set_user_var::check() function declaration.
        Added the Item_func_set_user_var::send() member function.
      sql/set_var.cc:
        Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Modified to use updated Item_func_set_user_var::check() function.
      sql/sql_class.cc:
        Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Modified to use updated Item_func_set_user_var::check() function.
      sql/sql_select.cc:
        Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
        Now an Item_func_set_user_var object isn't substituted for an Item_field object after filling a temporary table.
      c623e54f
  22. 09 Jun, 2006 1 commit
    • unknown's avatar
      Bug #7498 User variable SET saves SIGNED BIGINT as UNSIGNED BIGINT · f067dfe1
      unknown authored
      - Add unsigned flag to user_var_entry, used when 'type' is INT_RESULT
      - Propagate unsigned flag from the query executed by Item_single_row_subselect
      
      
      mysql-test/r/user_var.result:
        Update test results
      mysql-test/t/user_var.test:
        Add test case
      sql/item_func.cc:
        Add unsigned_flag to user_var_entry. Used when 'type' is INT_RESULT
        Pass unsigned_flag to 'update_hash' if type is INT_RESULT
      sql/item_func.h:
        Removed unused variable save_buff
        Add parameter unsigned_arg to 'update_hash'
      sql/item_subselect.cc:
        Propagate unsigned_flag to Item_singlerow_subselect from the items in the select to the cached items.
      sql/sql_class.h:
        Add unsigned_flag to user_var_entry. Used when 'type' is INT_RESULT
      f067dfe1
  23. 27 Apr, 2006 1 commit
    • unknown's avatar
      Remove obsolete test · 47ce2876
      unknown authored
      mysql-test/r/user_var.result:
        Update results
      mysql-test/t/user_var.test:
        Remove unnecessary test
      47ce2876
  24. 22 Feb, 2006 1 commit
    • unknown's avatar
      Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case · 31a7a0d6
      unknown authored
      mysql-test/r/alter_table.result:
        Update test result
      mysql-test/r/analyse.result:
        Update test result
      mysql-test/r/archive.result:
        Update test result
      mysql-test/r/archive_bitfield.result:
        Update test result
      mysql-test/r/archive_gis.result:
        Update test result
      mysql-test/r/bdb.result:
        Update test result
      mysql-test/r/bdb_gis.result:
        Update test result
      mysql-test/r/bigint.result:
        Update test result
      mysql-test/r/binary.result:
        Update test result
      mysql-test/r/case.result:
        Update test result
      mysql-test/r/cast.result:
        Update test result
      mysql-test/r/constraints.result:
        Update test result
      mysql-test/r/create.result:
        Update test result
      mysql-test/r/ctype_collate.result:
        Update test result
      mysql-test/r/ctype_create.result:
        Update test result
      mysql-test/r/ctype_latin1_de.result:
        Update test result
      mysql-test/r/ctype_many.result:
        Update test result
      mysql-test/r/ctype_mb.result:
        Update test result
      mysql-test/r/ctype_recoding.result:
        Update test result
      mysql-test/r/ctype_sjis.result:
        Update test result
      mysql-test/r/ctype_tis620.result:
        Update test result
      mysql-test/r/ctype_ucs.result:
        Update test result
      mysql-test/r/ctype_ujis.result:
        Update test result
      mysql-test/r/ctype_utf8.result:
        Update test result
      mysql-test/r/default.result:
        Update test result
      mysql-test/r/events.result:
        Update test result
      mysql-test/r/federated.result:
        Update test result
      mysql-test/r/fulltext.result:
        Update test result
      mysql-test/r/func_gconcat.result:
        Update test result
      mysql-test/r/func_group.result:
        Update test result
      mysql-test/r/func_math.result:
        Update test result
      mysql-test/r/func_misc.result:
        Update test result
      mysql-test/r/func_str.result:
        Update test result
      mysql-test/r/func_system.result:
        Update test result
      mysql-test/r/gis-rtree.result:
        Update test result
      mysql-test/r/heap.result:
        Update test result
      mysql-test/r/index_merge_innodb.result:
        Update test result
      mysql-test/r/information_schema.result:
        Update test result
      mysql-test/r/innodb.result:
        Update test result
      mysql-test/r/innodb_gis.result:
        Update test result
      mysql-test/r/key.result:
        Update test result
      mysql-test/r/merge.result:
        Update test result
      mysql-test/r/myisam.result:
        Update test result
      mysql-test/r/mysqldump-max.result:
        Update test result
      mysql-test/r/mysqldump.result:
        Update test result
      mysql-test/r/ndb_bitfield.result:
        Update test result
      mysql-test/r/ndb_gis.result:
        Update test result
      mysql-test/r/ndb_partition_key.result:
        Update test result
      mysql-test/r/null.result:
        Update test result
      mysql-test/r/partition.result:
        Update test result
      mysql-test/r/partition_02myisam.result:
        Update test result
      mysql-test/r/partition_mgm_err.result:
        Update test result
      mysql-test/r/partition_range.result:
        Update test result
      mysql-test/r/ps_2myisam.result:
        Update test result
      mysql-test/r/ps_3innodb.result:
        Update test result
      mysql-test/r/ps_4heap.result:
        Update test result
      mysql-test/r/ps_5merge.result:
        Update test result
      mysql-test/r/ps_6bdb.result:
        Update test result
      mysql-test/r/rpl_mixed_ddl_dml.result:
        Update test result
      mysql-test/r/rpl_multi_engine.result:
        Update test result
      mysql-test/r/rpl_ndb_UUID.result:
        Update test result
      mysql-test/r/show_check.result:
        Update test result
      mysql-test/r/sp-vars.result:
        Update test result
      mysql-test/r/sp.result:
        Update test result
      mysql-test/r/sql_mode.result:
        Update test result
      mysql-test/r/strict.result:
        Update test result
      mysql-test/r/subselect.result:
        Update test result
      mysql-test/r/symlink.result:
        Update test result
      mysql-test/r/synchronization.result:
        Update test result
      mysql-test/r/system_mysql_db.result:
        Update test result
      mysql-test/r/temp_table.result:
        Update test result
      mysql-test/r/trigger.result:
        Update test result
      mysql-test/r/type_binary.result:
        Update test result
      mysql-test/r/type_bit.result:
        Update test result
      mysql-test/r/type_bit_innodb.result:
        Update test result
      mysql-test/r/type_blob.result:
        Update test result
      mysql-test/r/type_decimal.result:
        Update test result
      mysql-test/r/type_enum.result:
        Update test result
      mysql-test/r/type_float.result:
        Update test result
      mysql-test/r/type_nchar.result:
        Update test result
      mysql-test/r/type_newdecimal.result:
        Update test result
      mysql-test/r/type_set.result:
        Update test result
      mysql-test/r/type_timestamp.result:
        Update test result
      mysql-test/r/type_varchar.result:
        Update test result
      mysql-test/r/union.result:
        Update test result
      mysql-test/r/user_var.result:
        Update test result
      mysql-test/r/variables.result:
        Update test result
      sql/sql_show.cc:
        Make ouput from SHOW CREATE TABLE use uppercase for "CHARACTER SET", "COLLATE", "DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
      31a7a0d6
  25. 01 Nov, 2005 1 commit
    • unknown's avatar
      Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort · ee380a07
      unknown authored
      Fix for bug #14536: SELECT @A,@A:=... fails with prepared statements
      
      
      mysql-test/r/func_sapdb.result:
        Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
      mysql-test/r/type_newdecimal.result:
        Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
      mysql-test/r/user_var.result:
        More test with SELECT @A:=
      mysql-test/t/disabled.def:
        Enable user_var.test for
      mysql-test/t/user_var.test:
        More test with SELECT @A:=
      sql/item.cc:
        Simple optimization during review of new code
      sql/item_func.cc:
        Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
      sql/item_timefunc.h:
        timediff() can return NULL for not NULL arguments
      sql/sql_base.cc:
        Remove usage of current_thd() in mysql_make_view()
      sql/sql_lex.h:
        Remove usage of current_thd() in mysql_make_view()
      sql/sql_select.cc:
        Fix for bug #14536: SELECT @A,@A:=... fails with prepared statements
      sql/sql_view.cc:
        Remove usage of current_thd() in mysql_make_view()
        Simple optimization of new code
      sql/sql_view.h:
        Remove usage of current_thd() in mysql_make_view()
      sql/table.cc:
        Simple optimization of new code
      ee380a07
  26. 02 Aug, 2005 1 commit
  27. 25 Jul, 2005 1 commit
    • unknown's avatar
      Don't force column header to @@session.var_name if @@local.var_name · f8a6e9d3
      unknown authored
      was used. (Bug #10724)
      
      
      mysql-test/r/key_cache.result:
        Updated results
      mysql-test/r/ps_1general.result:
        Updated results
      mysql-test/r/user_var.result:
        Add new results
      mysql-test/r/variables.result:
        Update results
      mysql-test/t/user_var.test:
        Add new regression test
      sql/item_func.cc:
        Don't set name explicitly in get_system_var(), let it get set by the
        select_item: rule in sql_parse.yy or other callers of get_system_var().
      sql/sql_parse.cc:
        Set the name on the Item returned by get_system_var().
      f8a6e9d3
  28. 18 May, 2005 1 commit
  29. 30 Apr, 2005 1 commit
    • unknown's avatar
      Setting a variable to CAST(NULL as X) set the result type of the variable to X. (Bug #6598) · ac82a2d5
      unknown authored
      mysql-test/r/bigint.result:
        Test to show show that the parser threats big longlong values as unsigned
      mysql-test/r/user_var.result:
        Test of CAST(NULL as SIGNED/UNSIGNED)
      mysql-test/t/bigint.test:
        Test to show show that the parser threats big longlong values as unsigned
      mysql-test/t/user_var.test:
        Test of CAST(NULL as SIGNED/UNSIGNED)
      sql/item_func.cc:
        Setting a variable to CAST(NULL as X) set the result type of the variable to X. (Bug #6598)
        Setting a variable to NULL doesn't change the old result type.
      sql/item_func.h:
        Detect setting a variable to NULL
      sql/unireg.cc:
        Safety fix
      ac82a2d5
  30. 06 Apr, 2005 2 commits
    • unknown's avatar
      after merge fix · 1fcebd55
      unknown authored
      mysql-test/r/user_var.result:
        after merge fixes - old (erroneous) results restored.
        Should be corrected when the fix is applied
      mysql-test/t/user_var.test:
        after merge fixes - old (erroneous) results restored.
        Should be corrected when the fix is applied
      1fcebd55
    • unknown's avatar
      Fix for bug #9286: SESSION/GLOBAL should be disallowed for user variables · 31d15c3f
      unknown authored
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      31d15c3f
  31. 30 Mar, 2005 1 commit
    • unknown's avatar
      Eliminate most of the remaining hardcoded list of tests to skip · 57221d3d
      unknown authored
      by adding check for embedded server within tests and splitting some
      tests into multiple test files.
      
      
      mysql-test/mysql-test-run.sh:
        Remove most of hardcoded list of tests to skip
      mysql-test/r/ps_1general.result:
        Update results
      mysql-test/r/timezone2.result:
        Update results
      mysql-test/r/user_var.result:
        Update results
      mysql-test/r/variables.result:
        Update results
      mysql-test/t/mix_innodb_myisam_binlog.test:
        Disable test with embedded server
      mysql-test/t/mysql_protocols.test:
        Disable test with embedded server
      mysql-test/t/mysqlbinlog.test:
        Disable test with embedded server
      mysql-test/t/mysqlbinlog2.test:
        Disable test with embedded server
      mysql-test/t/mysqldump.test:
        Disable test with embedded server
      mysql-test/t/packet.test:
        Disable test with embedded server
      mysql-test/t/ps_1general.test:
        Move parts of test to new ps_grant
      mysql-test/t/rename.test:
        Disable test with embedded server
      mysql-test/t/show_check.test:
        Disable test with embedded server
      mysql-test/t/system_mysql_db_fix.test:
        Disable test with embedded server
      mysql-test/t/timezone2.test:
        Move part of test to timezone_grant
      mysql-test/t/user_var.test:
        Move part of test to new user_var-binlog
      mysql-test/t/variables.test:
        Move part of test to rpl_variables
      57221d3d
  32. 28 Mar, 2005 1 commit
  33. 16 Mar, 2005 1 commit
    • unknown's avatar
      WL#874 "Extended LOAD DATA". · 5f75c8f5
      unknown authored
      Now one can use user variables as target for data loaded from file
      (besides table's columns). Also LOAD DATA got new SET-clause in which
      one can specify values for table columns as expressions.
      
      For example the following is possible:
      LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;
      
      This patch also implements new way of replicating LOAD DATA.
      Now we do it similarly to other queries.
      We store LOAD DATA query in new Execute_load_query event
      (which is last in the sequence of events representing LOAD DATA).
      When we are executing this event we simply rewrite part of query which
      holds name of file (we use name of temporary file) and then execute it
      as usual query. In the beggining of this sequence we use Begin_load_query
      event which is almost identical to Append_file event
      
      
      client/mysqlbinlog.cc:
        Added support of two new binary log events Begin_load_query_log_event and
        Execute_load_query_log_Event which are used to replicate LOAD DATA INFILE.
      mysql-test/r/ctype_ucs.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/insert_select.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/loaddata.result:
        Added tests for new LOAD DATA features.
      mysql-test/r/mix_innodb_myisam_binlog.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results (don't dare to get rid from binlog positions
        completely since it seems that this test uses them).
      mysql-test/r/mysqlbinlog.result:
        New approach for binlogging of LOAD DATA statement. Now we store it as
        usual query and rewrite part in which file is specified when needed.
        So now mysqlbinlog output for LOAD DATA much more closer to its initial
        form. Updated test'd results accordingly.
      mysql-test/r/mysqldump.result:
        Made test more robust to other tests failures.
      mysql-test/r/rpl000015.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_change_master.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results.
      mysql-test/r/rpl_charset.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly
      mysql-test/r/rpl_deadlock.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly
      mysql-test/r/rpl_error_ignored_table.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_flush_log_loop.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_flush_tables.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_loaddata.result:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event...
        
        Updated test's results wwith new binlog positions.
      mysql-test/r/rpl_loaddata_rule_m.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
        Since now LOAD DATA is replicated much in the same way as usual query
        --binlog_do/ignore_db work for it inthe same way as for usual queries.
      mysql-test/r/rpl_loaddata_rule_s.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_loaddatalocal.result:
        Added nice test for case when it is important that LOAD DATA LOCAL
        ignores duplicates.
      mysql-test/r/rpl_log.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly (don't dare to get rid from binlog 
        positions completely since it seems that this test uses them).
      mysql-test/r/rpl_log_pos.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_max_relay_size.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_multi_query.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_relayrotate.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_replicate_do.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_reset_slave.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_rotate_logs.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_server_id1.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_server_id2.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_temporary.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_timezone.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_until.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly and tweaked test a bit to bring it
        back to good shape.
      mysql-test/r/rpl_user_variables.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/user_var.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/t/ctype_ucs.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/insert_select.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/loaddata.test:
        Added test cases for new LOAD DATA functionality.
      mysql-test/t/mix_innodb_myisam_binlog.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/mysqlbinlog.test:
        New way of replicating LOAD DATA local. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event...
        
        Thus we need new binlog positions for LOAD DATA events.
      mysql-test/t/mysqlbinlog2.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/mysqldump.test:
        Made test more robust for failures of other tests.
      mysql-test/t/rpl_charset.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_deadlock.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_error_ignored_table.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/rpl_flush_tables.test:
        Addition of two new types of binary log events shifted binlog positions.
        Made test more robust for future similar changes.
      mysql-test/t/rpl_loaddata.test:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event...
        
        Apropritely updated comments in test.
      mysql-test/t/rpl_loaddata_rule_m.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar 
        changes.
        Since now LOAD DATA is replicated much in the same way as usual query
        --binlog_do/ignore_db work for it inthe same way as for usual queries.
      mysql-test/t/rpl_loaddata_rule_s.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_loaddatalocal.test:
        Added nice test for case when it is important that LOAD DATA LOCAL
        ignores duplicates.
      mysql-test/t/rpl_log.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly (don't dare to get rid from binlog positions
        completely since it seems that this test uses them).
      mysql-test/t/rpl_log_pos.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_multi_query.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_temporary.test:
        Addition of two new types of binary log events shifted binlog positions.
        Made test more robust for future similar changes.
      mysql-test/t/rpl_timezone.test:
        Addition of two new types of binary log events shifted binlog positions.
        Made test more robust for future similar changes.
      mysql-test/t/rpl_until.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and tweaked it a bit to bring it back to good
        shape.
      mysql-test/t/rpl_user_variables.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/user_var.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      sql/item_func.cc:
        Added Item_user_var_as_out_param class that represents user variable
        which used as out parameter in LOAD DATA.
        
        Moved code from Item_func_set_user_var::update_hash() function to
        separate static function to be able to reuse it in this new class.
      sql/item_func.h:
        Added Item_user_var_as_out_param class that represents user variable
        which used as out parameter in LOAD DATA.
      sql/log_event.cc:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event.
      sql/log_event.h:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event.
      sql/mysql_priv.h:
        Now mysql_load() has two more arguments. They are needed to pass list of
        columns and corresponding expressions from new LOAD DATA's SET clause.
      sql/share/errmsg.txt:
        Added new error message which is used to forbid loading of data from
        fixed length rows to variables.
      sql/sql_lex.h:
        Added LEX::fname_start/fname_end members. 
        They are pointers to part of LOAD DATA statement which should be
        rewritten during replication (file name + little extra).
      sql/sql_load.cc:
        Added support for extended LOAD DATA. 
        Now one can use user variables as target for data loaded from file 
        (besides table's columns). Also LOAD DATA got new SET-clause in which
        one can specify values for table columns as expressions.
        
        Updated mysql_load()/read_fixed_length()/read_sep_field() to support
        this functionality (now they can read data from file to both columns and
        variables and assign do calculations and assignments specified in SET
        clause).
        
        We also use new approach for LOAD DATA binlogging/replication.
      sql/sql_parse.cc:
        mysql_execute_command():
          Since now we have SET clause in LOAD DATA we should also check
          permissions for tables used in its expressions. Also mysql_load()
          has two more arguments to pass information about this clause.
      sql/sql_repl.cc:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event.
      sql/sql_repl.h:
        struct st_load_file_info:
          Removed memebers which are no longer needed for LOAD DATA binnlogging.
      sql/sql_yacc.yy:
        Added support for extended LOAD DATA syntax. Now one can use
        user variables as target for data loaded from file (besides table's 
        columns). Also LOAD DATA got new SET-clause in which one can specify
        values for table columns as expressions.
        
        For example the following is possible:
        LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;
        
        Also now we save pointers to the beginning and to the end of part of 
        LOAD DATA statement which should be rewritten during replication.
      5f75c8f5
  34. 23 Feb, 2005 1 commit
  35. 22 Feb, 2005 1 commit
    • unknown's avatar
      A user variable are now always have IMPLICIT coercibility, · 2fb807d1
      unknown authored
      independently from the expression it is initialized from.
      In other words, this change treats a user variable like
      a table with one column and one record. Discussed with 
      PeterG, Serg and Lars. This change also simplifies replication
      allowing not to replicate variables' coercibility.
      
      
      mysql-test/r/user_var.result:
        Test changes accordintly
      mysql-test/t/user_var.test:
        Test changes accordintly
      2fb807d1
  36. 17 Feb, 2005 1 commit