An error occurred fetching the project authors.
  1. 22 Mar, 2004 1 commit
    • unknown's avatar
      aliases should be compared with my_strcasecmp (BUG#3251) · 560fc037
      unknown authored
      some db comparison code cleupup
      removed compiler warnings
      
      
      mysql-test/r/lowercase_table.result:
        test for BUG#3251
      mysql-test/t/lowercase_table.test:
        test for BUG#3251
      sql/item.cc:
        simple strcmp can be used for db name comparison
      sql/set_var.h:
        changed initialisation order to satisfy compiler
      sql/sql_cache.cc:
        simple strcmp can be used for db name comparison
      sql/sql_db.cc:
        better use special cherset for files
      sql/sql_parse.cc:
        simple strcmp can be used for db name comparison
        aliases should be compared with my_strcasecmp
      sql/sql_select.cc:
        aliases should be compared with my_strcasecmp
      560fc037
  2. 20 Mar, 2004 2 commits
    • unknown's avatar
      sys_var_str.value is never NULL · 1f08d0b4
      unknown authored
      1f08d0b4
    • unknown's avatar
      after review changes · f379d7b1
      unknown authored
      sql/item.cc:
        removed double_fix & already_fixed in Item_field
      sql/item.h:
        added quick_fix_field() for cases when we are sure that no need full fix_field processing
        fixed neg() method for numeric constants to have the same logic as constant parser
        Item_null, Item_real, ... are constant which are fixed by creation
      sql/item_cmpfunc.h:
        right fix_fields in and_conds call
      sql/item_func.cc:
        changed Item_field constructor call
        fix_field emulation call
      sql/item_strfunc.cc:
        correct layout
      sql/item_subselect.cc:
        correct layout
        changed Item_field constructor call
      sql/item_sum.cc:
        changed Item_field constructor call
      sql/item_sum.h:
        changed Item_field constructor call
      sql/sql_base.cc:
        fixed layout
        right fix_fields calls
      sql/sql_help.cc:
        changed Item_field constructor call
      sql/sql_load.cc:
        changed Item_field constructor call
      sql/sql_parse.cc:
        constant changed
      sql/sql_select.cc:
        fixed layout
        fix_field emulation insted of real fix_fields call
      sql/sql_show.cc:
        changed Item_field constructor call
      sql/sql_union.cc:
        changed Item_field constructor call
        double_fix removed
      sql/sql_update.cc:
        renamed variable, fixed layout
      sql/sql_yacc.yy:
        typo fixed
        fix_fields emulation calls
        hegation of numbers fixed
      f379d7b1
  3. 18 Mar, 2004 1 commit
    • unknown's avatar
      DBUG_ASSERT(fixed == 1); added to val* · 1a81e041
      unknown authored
      small optimisation in signed_literal
      
      
      sql/field.cc:
        layout fixed
      sql/item.cc:
        DBUG_ASSERT(fixed == 1); added to val*
        layout fixed
        fixed= 1; added where it was forgoten in fix_fields
        Item_string can be used without fix_fields
      sql/item.h:
        DBUG_ASSERT(fixed == 1); added to val*
        Item_string can be used without fix_fields
      sql/item_cmpfunc.cc:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_cmpfunc.h:
        fixed layout and getting Item statistic
      sql/item_func.cc:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_func.h:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_geofunc.cc:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_strfunc.cc:
        DBUG_ASSERT(fixed == 1); added to val*
        layout fixed
      sql/item_strfunc.h:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_subselect.cc:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_sum.cc:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_sum.h:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_timefunc.cc:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_timefunc.h:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/item_uniq.h:
        DBUG_ASSERT(fixed == 1); added to val*
      sql/sql_base.cc:
        Item creation revised
      sql/sql_help.cc:
        Item creation revised
      sql/sql_load.cc:
        Item creation revised
      sql/sql_parse.cc:
        fix_field call added
      sql/sql_select.cc:
        Item creation revised
      sql/sql_show.cc:
        Item creation revised
      sql/sql_union.cc:
        Item creation revised
      sql/sql_update.cc:
        Item creation revised
      sql/sql_yacc.yy:
        Item creation revised
        small optimisation in signed_literal
      1a81e041
  4. 17 Mar, 2004 2 commits
    • unknown's avatar
      after merge fixes · 022c5241
      unknown authored
      include/my_tree.h:
        After merge fixes
      mysql-test/r/create.result:
        After merge fixes
      mysql-test/r/insert.result:
        After merge fixes
      mysql-test/r/multi_update.result:
        After merge fixes
      mysql-test/r/query_cache.result:
        After merge fixes
      mysql-test/r/rpl_error_ignored_table.result:
        After merge fixes
      mysql-test/r/rpl_optimize.result:
        After merge fixes
      mysql-test/r/show_check.result:
        After merge fixes
      mysql-test/t/insert.test:
        After merge fixes (Remove columns with space last)
      mysql-test/t/multi_update.test:
        After merge fixes
      mysql-test/t/show_check.test:
        After merge fixes
      sql/field.cc:
        Remove compiler warnings
      sql/sql_base.cc:
        Fix bug when table was refreshed
      022c5241
    • unknown's avatar
      After merge fixes · b5238021
      unknown authored
      b5238021
  5. 15 Mar, 2004 1 commit
    • unknown's avatar
      Fixes for bugs #2274 "mysqld gets SIGSEGV during processing of malformed · ef44fb9a
      unknown authored
      COM_EXECUTE packet" and #2795 "prepare + execute without bind_param crashes
       server" and #2473 "seg fault running tests/client_test.c": 
      - length checking added to packet parser 
      - default impelemntation of Item_param::set_param_func will work in
      case of malformed packet.
      No test cases are possible in our test suite, as there are no tests 
      operating on protocol layer.
      
      
      sql/item.cc:
        Default set_param function implemented: this is to not sigsegv in case
        of malformed packet with no parameters data.
      sql/item.h:
        - Item_param constructor moved to .cc to be able to assign set_param_func.
        - now embedded and ordinary versions of set_param have the same signature.
      sql/mysql_priv.h:
        mysql_stmt_execute now requires packet_length
      sql/sql_parse.cc:
        mysql_stmt_execute now requires packet length.
      sql/sql_prepare.cc:
        - length checking added to all functions working with network packet.
        - set_param_func's in embedded and ordinary version now have the same 
        signature
      ef44fb9a
  6. 12 Mar, 2004 1 commit
    • unknown's avatar
      Portability fixes & fixing of test suite · f85032f1
      unknown authored
      mysql-test/r/func_math.result:
        Updated tests after merge with 3.23
      mysql-test/r/multi_update.result:
        Fixed not portable test
      mysql-test/r/mysqlbinlog.result:
        Fixed test after push without doing 'make test'
      mysql-test/t/multi_update.test:
        Fixed not portable test
      sql/sql_parse.cc:
        Don't use static inline, as this is not portable
      f85032f1
  7. 11 Mar, 2004 2 commits
    • unknown's avatar
      Fix for BUG#2983 "If statement was killed on master, slave errors despite replicate-wild-ignore-t" · bd6c4ef4
      unknown authored
      We introduce a new function mysql_test_parse_for_slave().
      If the slave sees that the query got a really bad error on master
      (killed e.g.), then it calls this function to know if this query
      can be ignored because of replicate-*-table rules (do not worry
      about replicate-*-db rules: they are checked so early that they have
      no bug). If the answer is yes, it skips the query and continues. If
      it's no, then it stops and say "fix your slave data manually" (like it
      did before this change).
      
      
      mysql-test/r/rpl_error_ignored_table.result:
        result update
      mysql-test/t/rpl_error_ignored_table-slave.opt:
        ignore more tables
      mysql-test/t/rpl_error_ignored_table.test:
        we test if a killed query on the master, is ignored on the slave
        if the tables it involves should be excluded because of replicate-*-table
        rules.
      sql/log_event.cc:
        If the query got a really bad error on the master (thread killed etc),
        parse it to test the table names: if the replicate-*-do|ignore-table
        rules say "this query must be ignored" then we exit gracefully;
        otherwise we warn about the bad error and tell DBA to check/fix it.
        Before this change, we always warned and stopped.
      sql/mysql_priv.h:
        new function
      sql/slave.cc:
        don't print error immediately as we need to do one more test to
        be sure.
      sql/sql_parse.cc:
        we add a function mysql_test_parse_for_slave(), to be used only
        by the slave if it wants to know if the query should be ignored or not;
        so this function only parses the query, does not execute it.
      bd6c4ef4
    • unknown's avatar
      Fix for BUG#2921 "Replication problem on mutex lock in mySQL-4.0.18": · f8080302
      unknown authored
      re-using unused LOCK_active_mi to serialize all administrative
      commands related to replication:
      START SLAVE, STOP SLAVE, RESET SLAVE, CHANGE MASTER, init_slave()
      (replication autostart at server startup), end_slave() (replication
      autostop at server shutdown), LOAD DATA FROM MASTER.
      This protects us against a handful of deadlocks (like BUG#2921
      when two START SLAVE, but when two STOP SLAVE too).
      Removing unused variables.
      
      
      sql/item_func.cc:
        We don't need LOCK_active_mi just to MASTER_POS_WAIT().
      sql/repl_failsafe.cc:
        no need for macro
      sql/set_var.cc:
        no need for macro
      sql/slave.cc:
        Re-using unused LOCK_active_mi to serialize all administrative
        commands related to replication:
        START SLAVE, STOP SLAVE, RESET SLAVE, CHANGE MASTER, init_slave()
        (replication autostart at server startup), end_slave() (replication
        autostop at server shutdown), LOAD DATA FROM MASTER.
        This protects us against a handful of deadlocks.
        Removing unused variables.
      sql/slave.h:
        Re-using LOCK_active_mi to serialize administrative replication commands.
        Macros unneeded. Removing unneeded variables.
      sql/sql_parse.cc:
        found unused variable.
        Replacing macros.
      sql/sql_show.cc:
        replacing macros
      f8080302
  8. 08 Mar, 2004 1 commit
  9. 05 Mar, 2004 1 commit
    • unknown's avatar
      fixed Bug #2985 · 8550c7ab
      unknown authored
       "Table truncated when creating another table name with Spaces"
      added to check_db_name, check_table_name and check_column_name
      test for end space
      
      
      mysql-test/r/create.result:
        added test for Bug #2985 
         "Table truncated when creating another table name with Spaces"
      mysql-test/t/create.test:
        added test for Bug #2985 
         "Table truncated when creating another table name with Spaces"
      sql/sql_db.cc:
        cancel strip end spaces for database name
      sql/sql_parse.cc:
        cancel strip end spaces for database name
      sql/table.cc:
        added to check_db_name, check_table_name and check_column_name 
        test for end space
      8550c7ab
  10. 04 Mar, 2004 1 commit
    • unknown's avatar
      invalidation of locking for write tables (BUG#2693) · d4f43e51
      unknown authored
      fixed linking query_prealloc_size to query cache presence
      
      
      mysql-test/r/query_cache.result:
        test of QC invalidation by LOCK command
      mysql-test/t/query_cache.test:
        test of QC invalidation by LOCK command
      sql/mysqld.cc:
        new variable query_cache_wlock_invalidate
        fixed query_prealloc_size with QC absence
      sql/set_var.cc:
        new variable query_cache_wlock_invalidate
      sql/sql_cache.cc:
        new method for table invalidation
      sql/sql_cache.h:
        new method for table invalidation
      sql/sql_class.h:
        new variable query_cache_wlock_invalidate
      sql/sql_parse.cc:
        layout fixed
      d4f43e51
  11. 02 Mar, 2004 1 commit
    • unknown's avatar
      Desperate attempt to push part of prepared statements cleanup which was · 7b68eaaf
      unknown authored
      reviewed in Saint-Petersbourg (including post-review fixes).
      
      
      include/my_sys.h:
        Added clear_alloc_root (reset alloc root without freeing its memory)
      sql/item.h:
        - rename setup_param -> set_parap (function assigns parameter value to item)
      sql/mysql_priv.h:
        - all return values are void, because return value is never checked in
            dispatch_command
        - removed unused declaration of setup_param_functions
      sql/protocol.h:
        - unused declarations of setup_params_data* removed
      sql/sql_class.cc:
        Cleanup:
          - bzero(mem_root) replaced with clear_alloc_root
          - query_id and command members moved back to THD from Statement
        Assignment of mem_root, free_list, query_id and command optimized
        away from set_statement().
      sql/sql_class.h:
        - query_id and command moved back to THD from Statement
      sql/sql_lex.h:
        - better type for param_list
        - param_count is the same thing as param_list.elements
      sql/sql_parse.cc:
        - comments for dispatch_command
      sql/sql_prepare.cc:
        Cleanup:
        - added comments to many functions and removed trailing spaces in many 
          lines, some stale comments removed.
        - it's faster to iterate using pointers, than classes
        - Renames: error_in_prepare renamed to get_longdata_error (because it is set
          when there is an error in mysql_send_longdata, rather than in
          mysql_prepare), embedded versions of placeholder assignement functions
          now have prefix emb_, setup_ functions renamed to set_, because they
          perform assignment, not installation, setup_params_data now doesn't
          call insert_params and was renamed to setup_set_param_functions,
        - find_prepared_statement should not send error if called from no-reply
          calls, like mysql_stmt_reset
        - error reporting is checked up, to always report errors and not report
          errors twice. send_prep_stmt can be done mostly in send_prepare_result, 
          rather than in test_* functions.
        - now we don't need to reinit THD->mem_root/free_list in mysql_stmt_execute,
          because it's not reset there.
      tests/client_test.c:
        - removed second call to test_subqueries
      7b68eaaf
  12. 28 Feb, 2004 1 commit
    • unknown's avatar
      Fix for BUG#3000: · 57659a4d
      unknown authored
      "replicate-wild-*-table=db.% does not apply to ALTER DATABASE"
      apply replicate-* rules to ALTER DATABASE like we already do
      for CREATE DATABASE/ DROP DATABASE.
      
      
      sql/sql_parse.cc:
        apply replicate-* rules to ALTER DATABASE like we already do
        for CREATE DATABASE/ DROP DATABASE.
      57659a4d
  13. 21 Feb, 2004 1 commit
    • unknown's avatar
      Fix for BUG#2757 · d68c56a4
      unknown authored
      "--read-only gives weird error on update".
      It is not fixable in 4.0 because it requires modifying
      the sql/share/*/errmsg.txt files. So it is fixed in 4.1 like this:
      the ER_SKIP_GRANT_TABLES is replaced by a more generic
      ER_OPTION_PREVENTS_STATEMENT which can be used both for
      "can't do this because of --skip-grant-tables" and
      "can't do this because of --read-only" (for this we don't use
      ER_CANT_UPDATE_WITH_READLOCK anymore).
      So now the message for --read-only is:
      "The MySQL server is running with the --read-only option so
      cannot execute this statement".
      
      
      include/mysqld_error.h:
        more general naming as more general message
      sql/share/czech/errmsg.txt:
        message change
      sql/share/danish/errmsg.txt:
        message change
      sql/share/dutch/errmsg.txt:
        message change
      sql/share/english/errmsg.txt:
        message change
      sql/share/estonian/errmsg.txt:
        message change
      sql/share/french/errmsg.txt:
        message change
      sql/share/german/errmsg.txt:
        message change
      sql/share/greek/errmsg.txt:
        message change
      sql/share/hungarian/errmsg.txt:
        message change
      sql/share/italian/errmsg.txt:
        message change
      sql/share/japanese/errmsg.txt:
        message change
      sql/share/korean/errmsg.txt:
        message change
      sql/share/norwegian-ny/errmsg.txt:
        message change
      sql/share/norwegian/errmsg.txt:
        message change
      sql/share/polish/errmsg.txt:
        message change
      sql/share/portuguese/errmsg.txt:
        message change
      sql/share/romanian/errmsg.txt:
        message change
      sql/share/russian/errmsg.txt:
        message change
      sql/share/serbian/errmsg.txt:
        message change
      sql/share/slovak/errmsg.txt:
        message change
      sql/share/spanish/errmsg.txt:
        message change
      sql/share/swedish/errmsg.txt:
        message change
      sql/share/ukrainian/errmsg.txt:
        message change
      sql/sql_acl.cc:
        Changes to use the more generic ER_OPTION_PREVENTS_STATEMENT
        instead of ER_SKIP_GRANT_TABLES:
        * use of net_printf() instead of send_error() (because send_error()
        does not support printf-like format).
        * in some places we now just do my_error() and return -1
        (only caller is mysql_execute_command() which does send_error()
        if result is -1).
        * Replaced my_printf_error() by simpler my_error() (except in 2 locations
        where there was a "we must use my_printf_error()" comment).
      sql/sql_parse.cc:
        new error code (more generic).
      d68c56a4
  14. 20 Feb, 2004 1 commit
  15. 16 Feb, 2004 1 commit
    • unknown's avatar
      After merge fixes · a07e48ec
      unknown authored
      Added more DBUG statements
      Ensure that we are comparing end space with BINARY strings
      Use 'any_db' instead of '' to mean any database. (For HANDLER command)
      Only strip ' ' when comparing CHAR, not other space-like characters (like \t)
      
      
      BitKeeper/deleted/.del-ctype_tis620.result-old~3578ceb0b8284685:
        Delete: mysql-test/r/ctype_tis620.result-old
      BitKeeper/deleted/.del-ctype_tis620.test-old~ffb1bbd2935d1aba:
        Delete: mysql-test/t/ctype_tis620.test-old
      client/mysqlbinlog.cc:
        Added DBUG statements
        Added call of my_end() to free all used memory on exit
      heap/hp_info.c:
        After merge fixes
      heap/hp_open.c:
        After merge fixes
      include/heap.h:
        After merge fixes
      include/m_ctype.h:
        Use pchar instead of 'int' for character parameters.
        Added 'my_binary_compare()'
      include/m_string.h:
        Fixed wrong define
      innobase/ibuf/ibuf0ibuf.c:
        After merge fixes
      innobase/srv/srv0start.c:
        After merge fixes
      mysql-test/r/alter_table.result:
        Fixed results after merge
      mysql-test/r/auto_increment.result:
        Fixed results after merge
      mysql-test/r/bdb.result:
        Fixed results after merge
      mysql-test/r/binary.result:
        Fixed results after merge
      mysql-test/r/create.result:
        Fixed results after merge
      mysql-test/r/ctype_mb.result:
        Fixed results after merge
      mysql-test/r/ctype_tis620.result:
        Fixed results after merge
      mysql-test/r/ctype_utf8.result:
        Fixed results after merge
      mysql-test/r/delete.result:
        Fixed results after merge
      mysql-test/r/func_compress.result:
        Fixed results after merge
      mysql-test/r/func_gconcat.result:
        Fixed results after merge
      mysql-test/r/func_group.result:
        Fixed results after merge
      mysql-test/r/func_str.result:
        Fixed results after merge
      mysql-test/r/innodb.result:
        Fixed results after merge
      mysql-test/r/insert.result:
        Fixed results after merge
      mysql-test/r/insert_select.result:
        Fixed results after merge
      mysql-test/r/key.result:
        Fixed results after merge
      mysql-test/r/loaddata.result:
        Fixed results after merge
      mysql-test/r/lock.result:
        Fixed results after merge
      mysql-test/r/myisam.result:
        Fixed results after merge
      mysql-test/r/null.result:
        Fixed results after merge
      mysql-test/r/null_key.result:
        Fixed results after merge
      mysql-test/r/order_by.result:
        Fixed results after merge
      mysql-test/r/query_cache.result:
        Fixed results after merge
      mysql-test/r/range.result:
        Fixed results after merge
      mysql-test/r/rpl_multi_delete.result:
        Fixed results after merge
      mysql-test/r/rpl_until.result:
        Fixed results after merge
      mysql-test/r/subselect.result:
        Fixed results after merge
      mysql-test/r/subselect_innodb.result:
        Fixed results after merge
      mysql-test/r/type_blob.result:
        Fixed results after merge
      mysql-test/r/type_datetime.result:
        Fixed results after merge
      mysql-test/r/type_decimal.result:
        Fixed results after merge
      mysql-test/r/type_enum.result:
        Fixed results after merge
      mysql-test/r/type_float.result:
        Fixed results after merge
      mysql-test/r/type_ranges.result:
        Fixed results after merge
      mysql-test/r/type_time.result:
        Fixed results after merge
      mysql-test/r/type_timestamp.result:
        Fixed results after merge
      mysql-test/r/type_uint.result:
        Fixed results after merge
      mysql-test/r/type_year.result:
        Fixed results after merge
      mysql-test/r/variables.result:
        Fixed results after merge
      mysql-test/r/warnings.result:
        Fixed results after merge
      mysql-test/t/case.test:
        Fixed shifted error messages
      mysql-test/t/create.test:
        Fixed shifted error messages
      mysql-test/t/ctype_collate.test:
        Fixed shifted error messages
      mysql-test/t/ctype_tis620.test:
        Merge with 4.0 ctype_tis620 test
      mysql-test/t/delete.test:
        Fixed shifted error messages
      mysql-test/t/derived.test:
        Fixed shifted error messages
      mysql-test/t/fulltext.test:
        Fixed shifted error messages
      mysql-test/t/func_in.test:
        Fixed shifted error messages
      mysql-test/t/func_str.test:
        Fixed shifted error messages
      mysql-test/t/func_test.test:
        Fixed shifted error messages
      mysql-test/t/grant.test:
        Fixed shifted error messages
      mysql-test/t/innodb.test:
        Change to 4.1 syntax
      mysql-test/t/key_cache.test:
        Fixed shifted error messages
      mysql-test/t/myisam.test:
        New test of blob and end space
      mysql-test/t/row.test:
        Fixed shifted error messages
      mysql-test/t/rpl_until.test:
        Fixed shifted error messages
      mysql-test/t/subselect.test:
        Fixed shifted error messages
      mysql-test/t/subselect_innodb.test:
        Fix test to take into account foreign key constraints
      mysql-test/t/union.test:
        Fixed shifted error messages
      mysql-test/t/user_var.test:
        Fixed shifted error messages
      mysql-test/t/variables.test:
        Fixed shifted error messages
      mysys/my_handler.c:
        Merge with 4.0 code
      sql/ha_heap.cc:
        After merge fixes
      sql/handler.cc:
        After merge fixes
      sql/item.cc:
        After merge fixes
      sql/item_cmpfunc.cc:
        Ensure that we are comparing end space with BINARY strings
      sql/item_cmpfunc.h:
        Ensure that we are comparing end space with BINARY strings
      sql/log_event.cc:
        More DBUG statements
        Ensure that we use all options to LOAD DATA in replication
      sql/opt_range.cc:
        After merge fixes
      sql/sql_db.cc:
        After merge fixes
      sql/sql_handler.cc:
        After merge fixes
        Use 'any_db' instead of '' to mean 'no database comparison'
      sql/sql_parse.cc:
        After merge fixes
      sql/sql_select.cc:
        After merge fixes
        Added function comment for setup_group()
      sql/sql_string.cc:
        Added stringcmp() for binary comparison.
        Added function comments for sortcmp() and stringcmp()
      sql/sql_string.h:
        Added stringcmp()
      sql/sql_table.cc:
        After merge fixes
      sql/sql_update.cc:
        After merge fixes
      sql/sql_yacc.yy:
        Use 'any_db' instead of '' to mean any database. Using "" causes a 'wrong db name' error.
      strings/ctype-big5.c:
        Strip only end space, not other space characters.
      strings/ctype-bin.c:
        Removed some not needed functions.
        Added function comments
        Don't remove end space in comparisons
        Change my_wildcmp_bin() to be 'identical' with other similar code
      strings/ctype-czech.c:
        Strip only end space, not other space characters.
      strings/ctype-gbk.c:
        Strip only end space, not other space characters.
      strings/ctype-latin1.c:
        Strip only end space, not other space characters.
      strings/ctype-mb.c:
        Strip only end space, not other space characters.
      strings/ctype-simple.c:
        Strip only end space, not other space characters.
      strings/ctype-sjis.c:
        Strip only end space, not other space characters.
      strings/ctype-tis620.c:
        Added usage of my_instr_simple. This needs to be cleaned up!
      strings/ctype-utf8.c:
        Strip only end space, not other space characters.
      strings/ctype-win1250ch.c:
        Strip only end space, not other space characters.
        Fixed indentation
      strings/strto.c:
        Code cleanup
      a07e48ec
  16. 14 Feb, 2004 1 commit
    • unknown's avatar
      Fix for #2212 (mysql_change_user doesn't work in embedded library) · b012018b
      unknown authored
      now it's working
      
      
      include/mysql.h:
        read_change_user_result 'virtual' method added
      libmysql/client_settings.h:
        cli_read_change_user_result interface
      libmysql/libmysql.c:
        cli_read_change_user_result implementation
      libmysqld/lib_sql.cc:
        emb_read_change_user_result implementation
      sql-common/client.c:
        cli_read_change_user_result added to the method's table
      sql/sql_parse.cc:
        fixes to make mysql_change_user working in embedded library
      b012018b
  17. 13 Feb, 2004 1 commit
    • unknown's avatar
      Another fix for #2208 · f2adc112
      unknown authored
      previous one had error
      
      
      libmysqld/lib_sql.cc:
        memdup_mysql deleted
      sql/sql_class.h:
        String instead of char*
      sql/sql_parse.cc:
        storing of the rest of the query
      f2adc112
  18. 12 Feb, 2004 1 commit
    • unknown's avatar
      Bug#2703 · 1e8dcbe0
      unknown authored
      "MySQL server does not detect if garbage chara at the end of query"
      
      Allow the parser to see the garbage characters.
      Garbage should cause the parser to report an error.
      
      
      sql/sql_lex.cc:
        Return END_OF_INPUT when at the end of the input buffer.
        Allows the parser to determine if there is junk after a \0 character.
      sql/sql_parse.cc:
        Undo 1.314.1.1 04/02/11 12:32:42 guilhem@mysql.com
      sql/sql_prepare.cc:
        Undo 1.73 04/02/11 12:32:42 guilhem@mysql.com
      1e8dcbe0
  19. 11 Feb, 2004 1 commit
    • unknown's avatar
      Fix for BUG#2703 · 0aa48dc5
      unknown authored
      "MySQL server does not detect if garbage chars at the end of query":
      
      Detect garbage chars at the end of the query or at the end of a query
      for a prepared statement (which happens if mysql_real_query() or mysql_prepare()
      were called with a too big 'length' parameter (bigger than the real intended
      length of the query: then we receive a query + garbage characters from the
      client). This resulted in garbage chars written into the binlog.
      Now instead the client receives something like:
      'You have an error in your SQL syntax.  Check the manual that corresponds
      to your MySQL server version for the right syntax to use near '!stmt'
      at line 1' i.e. the server is pointing at the weird tail of the query
      (this '!stmt' are the garbage chars sent by the client).
      All tests pass, except mysqldump.test and ctype_utf8.test but they failed
      before the patch.
      
      
      sql/sql_parse.cc:
        Detect garbage chars at the end of the query
        (which happens if mysql_real_query() was called with a too big 'length'
        parameter (bigger than the real intended length of the query: then
        we receive a query + garbage characters from the client).
      sql/sql_prepare.cc:
        Detect garbage chars at the end of the query
        (which happens if mysql_prepare() was called with a too big 'length'
        parameter (bigger than the real intended length of the query: then
        we receive a query + garbage characters from the client).
      tests/client_test.c:
        The change to sql_parse.cc and sql_prepare.cc rightfully gives many
        syntax errors to tests/client_test.c which is full of
        mysql_prepare(mysql, "SHOW TABLES", 100).
        Correcting all these commands.
      0aa48dc5
  20. 10 Feb, 2004 1 commit
    • unknown's avatar
      Fix for #2208 (multi-query returns wrong result in embedded library) · b4fc7c7f
      unknown authored
      now we execute only one first select during mysql_real_query
      others - during 'mysql_next_result'
      
      
      include/mysql.h:
        'virtual' next_result added
      libmysql/client_settings.h:
        cli_next_result declaration added
      libmysql/libmysql.c:
        mysql_next_result now works in embedded library as well
      libmysqld/lib_sql.cc:
        emb_next_result implemented
      sql/sql_class.h:
        fields to store the rest of the query added
      sql/sql_parse.cc:
        Saving the rest of the query added for embedded case
      b4fc7c7f
  21. 09 Feb, 2004 1 commit
    • unknown's avatar
      ufter revview fix (BUG#2120) · 61f0e69c
      unknown authored
      mysql-test/r/derived.result:
        test of error handling in derived tables with UPDATE & DELETE
      mysql-test/t/derived.test:
        test of error handling in derived tables with UPDATE & DELETE
      sql/mysql_priv.h:
        opened tables counter added to avoid loop of tables calculating in lock_tables
      sql/sql_acl.cc:
        opened tables counter added to avoid loop of tables calculating in lock_tables, here it is just for compatibility
      sql/sql_base.cc:
        removed unneeded assignment
        opened tables counter added to avoid loop of tables calculating in lock_tables
        commentary fixed
      sql/sql_derived.cc:
        mysql_derived made static
        variable res moved in place where it used
        priveleges written in correct place
      sql/sql_handler.cc:
        opened tables counter added to avoid loop of tables calculating in lock_tables
      sql/sql_parse.cc:
        mistyping in commentary fixed
      61f0e69c
  22. 04 Feb, 2004 1 commit
    • unknown's avatar
      correct assignment of default limit (BUG#2600) · fc248069
      unknown authored
      mysql-test/r/subselect.result:
        test of global limit and subqueries
      mysql-test/t/subselect.test:
        test of global limit and subqueries
      sql/sql_lex.cc:
        correct detection of non-default limits
      sql/sql_parse.cc:
        correct assignment of default limit
      sql/sql_yacc.yy:
        correct assignment of default limit
      fc248069
  23. 03 Feb, 2004 2 commits
    • unknown's avatar
      cleanup: #ifdef DELETE_ITEMS removed · f0a715f3
      unknown authored
      sql/item.cc:
        #ifdef DELETE_ITEMS removed
      sql/item_cmpfunc.cc:
        #ifdef DELETE_ITEMS removed
      sql/sql_parse.cc:
        #ifdef DELETE_ITEMS removed
      sql/sql_select.cc:
        #ifdef DELETE_ITEMS removed
      f0a715f3
    • unknown's avatar
      Ensure that privileges are tested properly for multi-table-updates. · 313761cb
      unknown authored
      Now one need only SELECT privilege for tables that are only read in
      UPDATE statements with many tables. (Bug #2377).
      
      
      sql/sql_acl.cc:
        Comment cleanup
      sql/sql_parse.cc:
        Merged duplicate code.
        Removed some outdated 'tables->db' tests.
        Check privileges for multi-updates properly (Bug #2377)
      sql/sql_show.cc:
        Remove disabled code
      sql/sql_update.cc:
        Ensure that privileges are tested properly for multi-table-updates
      tests/grant.pl:
        Added more tests
      tests/grant.res:
        updated results
      313761cb
  24. 01 Feb, 2004 1 commit
    • unknown's avatar
      now all tables of query are locked in one place (including derived tables) · 68c0a299
      unknown authored
      fixed BUG#2120 and other problem with EXPLAINing derived tables
      
      
      mysql-test/r/derived.result:
        correct tables names & Co in derived tables
        test case for BUG#2120
      mysql-test/t/derived.test:
        test case for BUG#2120
      sql/mysql_priv.h:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables)
      sql/repl_failsafe.cc:
        correct initialization of TABLE_LIST
      sql/sql_acl.cc:
        used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
      sql/sql_base.cc:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables)
      sql/sql_delete.cc:
        all tables processing is done during opening
      sql/sql_derived.cc:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables) to sutisfy "all query tables locking" at the moment
      sql/sql_insert.cc:
        all tables processing is done during opening
        correct initialization of TABLE_LIST
      sql/sql_lex.cc:
        now table list will be created for whole query
        layout fix
        correct check of updated table in subqueries
      sql/sql_lex.h:
        now table list will be created for whole query
        correct check of updated table in subqueries
      sql/sql_olap.cc:
        THIS FUNCTION IS USED NOWHERE
        it will be good to remove it at all (handle_olaps)
      sql/sql_parse.cc:
        derived tables processing moved after open/locking all tables (in open_and_lock_tables)
      sql/sql_prepare.cc:
        new creating list parameters
        all tables processing is done during opening
      sql/sql_select.cc:
        all tables processing is done during opening
      sql/sql_select.h:
        now it used only within file where is defined
      sql/sql_udf.cc:
        used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
      sql/sql_update.cc:
        all tables processing is done during opening
      68c0a299
  25. 30 Jan, 2004 1 commit
    • unknown's avatar
      Fix for bugs #1885, #2464, #2539. Proper handling of default · a96ffb29
      unknown authored
      values for TIMESTAMP columns. The solution is not perfect since
      we just silently ignoring default value for first TIMESTAMP 
      column and properly reflecting this fact in SHOW CREATE TABLE.
      We can't give a warning or simply support standard syntax 
      (niladic functions as legal value for default) for first field 
      since it is 4.0 tree.
      
      
      mysql-test/r/type_timestamp.result:
        Added test for bugs #1885, #2464, #2539
        (proper support of default values for TIMESTAMP columns)
      mysql-test/t/type_timestamp.test:
        Added test for bugs #1885, #2464, #2539
        (proper support of default values for TIMESTAMP columns)
      sql/field.cc:
        Enabled copying of defaults for TIMESTAMP fields when we are 
        creating table with CREATE TABLE x (SELECT ...)
      sql/field.h:
        Set proper DEFAULT value for non-first TIMESTAMP column.
      sql/sql_parse.cc:
        Allowed default values for TIMESTAMP column.
      sql/sql_show.cc:
        Enabled printing of default values in SHOW CREATE TABLE and 
        SHOW COLUMNS for all TIMESTAMP columns except first one.
      a96ffb29
  26. 29 Jan, 2004 1 commit
    • unknown's avatar
      Fix for BUG#2527 "Multi-Table Delete - Not Replication use replicate-wild-do-table" · 8746a255
      unknown authored
      (as long as replicate-*-table rules were defined, multi-table DELETE was never
      replicated by the slave).
      
      
      sql/sql_parse.cc:
        For a multi-table DELETE, there are two lists of tables:
        - 'tables' contains the tables in the FROM. They have 'updating==0'.
        - 'thd->lex.auxilliary_table_list.first' contains the tables between the DELETE and the FROM. They have 'updating==1'.
        So the bug was that the slave only tests 'tables' and as all its elements have updating==0,
        tables_ok() always returns 0.
        So for a multi DELETE the slave now tests the 2nd list too.
        I started with the other tip of the sausage: I thought of changing multi DELETE to use
        only one list (given that 'updating' can be used to separate it in two when needed)
        (with one list we wouldn't need to change the slave code), but finally hit the unicity
        check in add_table_to_list() which started to return ER_NONUNIQ_TABLE (logical).
      8746a255
  27. 28 Jan, 2004 1 commit
  28. 20 Jan, 2004 2 commits
    • unknown's avatar
      for multy-delete command used same algorithm of table reference (alias) · 7a1a5cd2
      unknown authored
      mysql-test/t/multi_update.test:
        new results of changed multi-delete
      mysql-test/t/update.test:
        new results of changed multi-delete
      mysql-test/r/multi_update.result:
        new results of changed multi-delete
      mysql-test/r/update.result:
        new results of changed multi-delete
      7a1a5cd2
    • unknown's avatar
      Pack of changes about 'cleanup()'-s · 9768dc84
      unknown authored
      Some errorneous code trimmed
      
      
      sql/item.cc:
        initialization of the Item_type_holder::orig_item added
      sql/item.h:
        No use to call cleanup() in ~Item
        this only calls Item::cleanup()
        
        We should use item->delete_self() instead of 'delete item' now
        
        Code added to restore Item_type_holder::item_type value
      sql/item_row.h:
        this cleanup is wrong
      sql/item_sum.cc:
        initialization added
      sql/item_sum.h:
        Item_xxx& -> Item_xxx*
      sql/sql_parse.cc:
        delete item -> item->delete_self()
      9768dc84
  29. 09 Jan, 2004 1 commit
    • unknown's avatar
      null.result, null.test: · d84ee4d5
      unknown authored
         Fix for a bug #2219, regarding a bad cast to integer from NULL
      item_func.h:
        Fix for a bug #2219, regarding a bad cast to integer from NULL
      sql_parse.cc:
        A fix for a bug #2207, with mysql server haning on option setting
      
      
      sql/sql_parse.cc:
        A fix for a bug #2207, with mysql server haning on option setting
      sql/item_func.h:
        Fix for a bug #2219, regarding a bad cast to integer from NULL
      mysql-test/t/null.test:
         Fix for a bug #2219, regarding a bad cast to integer from NULL
      mysql-test/r/null.result:
         Fix for a bug #2219, regarding a bad cast to integer from NULL
      d84ee4d5
  30. 04 Jan, 2004 1 commit
    • unknown's avatar
      allow UPDATE and DELETE stetements with tables derived from subquery if they... · fbf563e8
      unknown authored
      allow UPDATE and DELETE stetements with tables derived from subquery if they are not updated (BUG#2117)
      allow delete table by alias in multi-delete statement
      
      
      
      include/mysqld_error.h:
        new error message about non-updateable table
      mysql-test/r/derived.result:
        test of multi-update and multi-delete
      mysql-test/t/derived.test:
        test of multi-update and multi-delete
      sql/share/czech/errmsg.txt:
        new error message about non-updateable table
      sql/share/danish/errmsg.txt:
        new error message about non-updateable table
      sql/share/dutch/errmsg.txt:
        new error message about non-updateable table
      sql/share/english/errmsg.txt:
        new error message about non-updateable table
      sql/share/estonian/errmsg.txt:
        new error message about non-updateable table
      sql/share/french/errmsg.txt:
        new error message about non-updateable table
      sql/share/german/errmsg.txt:
        new error message about non-updateable table
      sql/share/greek/errmsg.txt:
        new error message about non-updateable table
      sql/share/hungarian/errmsg.txt:
        new error message about non-updateable table
      sql/share/italian/errmsg.txt:
        new error message about non-updateable table
      sql/share/japanese/errmsg.txt:
        new error message about non-updateable table
      sql/share/korean/errmsg.txt:
        new error message about non-updateable table
      sql/share/norwegian-ny/errmsg.txt:
        new error message about non-updateable table
      sql/share/norwegian/errmsg.txt:
        new error message about non-updateable table
      sql/share/polish/errmsg.txt:
        new error message about non-updateable table
      sql/share/portuguese/errmsg.txt:
        new error message about non-updateable table
      sql/share/romanian/errmsg.txt:
        new error message about non-updateable table
      sql/share/russian/errmsg.txt:
        new error message about non-updateable table
      sql/share/serbian/errmsg.txt:
        new error message about non-updateable table
      sql/share/slovak/errmsg.txt:
        new error message about non-updateable table
      sql/share/spanish/errmsg.txt:
        new error message about non-updateable table
      sql/share/swedish/errmsg.txt:
        new error message about non-updateable table
      sql/share/ukrainian/errmsg.txt:
        new error message about non-updateable table
      sql/sql_parse.cc:
        allow delete table by alias
        separate error message for try to delete derived table
      sql/sql_update.cc:
        test "is updated table derived?"
      sql/sql_yacc.yy:
        error message in case of try to update derived table
      fbf563e8
  31. 30 Dec, 2003 1 commit
    • unknown's avatar
      Some small portability fixes. · 376fb080
      unknown authored
      Added support for lower_case_table_names=2, which is to be used on case insensitive file systems.
      This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux)
      
      
      client/mysqltest.c:
        Indentation cleanup
      include/myisam.h:
        Made some pointers 'const'
      mysql-test/mysql-test-run.sh:
        Portability fix for OSX
      sql/filesort.cc:
        Safety fix (not needed for current code but needed for 5.0)
      sql/ha_berkeley.cc:
        More debugging
        Changed 'create' to return error number
      sql/ha_berkeley.h:
        Added HA_FILE_BASED
      sql/ha_innodb.cc:
        Added missing DBUG_RETURN
      sql/ha_isam.cc:
        Changed create to return error number
      sql/ha_isam.h:
        Added HA_FILE_BASED
      sql/ha_isammrg.h:
        Added HA_FILE_BASED
      sql/ha_myisam.cc:
        Changed create to return error number
      sql/ha_myisam.h:
        Added HA_FILE_BASED
      sql/ha_myisammrg.cc:
        Changed create to return error number
      sql/ha_myisammrg.h:
        Added HA_FILE_BASED
      sql/handler.cc:
        Ensure that table engines gets table names in lower case even if we are using lower_case_table_names
        Removed test for DB_TYPE_INNODB by ensuring that create method returns error number.
      sql/handler.h:
        Added HA_FILE_BASED
        Made some struct entries 'const'
        Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems
      sql/mysql_priv.h:
        Support for lower_case_table_names=2
      sql/mysqld.cc:
        Support for lower_case_table_names=2
        Moved test of case insenstive file system after all mutex are created
      sql/set_var.cc:
        Support for lower_case_table_names=2
      sql/sql_class.h:
        Indentation change
      sql/sql_db.cc:
        Support for lower_case_table_names=2
      sql/sql_insert.cc:
        Indentation change
      sql/sql_parse.cc:
        Support for lower_case_table_names=2
      sql/sql_rename.cc:
        Support for lower_case_table_names=2
        Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows
      sql/sql_show.cc:
        If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE
      sql/sql_table.cc:
        Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
      376fb080
  32. 24 Dec, 2003 1 commit
    • unknown's avatar
      sql_parse.cc: · 229cc612
      unknown authored
        Fix for the bug 1175: Usernames will not converted to utf8 during connect
      
      
      sql/sql_parse.cc:
        Fix for the bug 1175: Usernames will not converted to utf8 during connect
      229cc612
  33. 21 Dec, 2003 1 commit
  34. 19 Dec, 2003 2 commits
    • unknown's avatar
      Prepared_statement deployed instead of PREP_STMT. · 32c6b0d7
      unknown authored
      libmysqld/lib_sql.cc:
        Prepared_statement now resides entirely in sql_prepare.cc
        Embedded versions of setup_params_data moved to sql_prepare.cc
      sql/mysql_priv.h:
        removed declarations for non-existing functions
      sql/slave.cc:
        no thd->init_for_queries() any more
      sql/sql_class.cc:
        added Statement and Statement_map classes.
        PREP_STMT replaced with Statement (Prepared_statement) and moved to
        sql_prepare.cc
      sql/sql_class.h:
        added Statement and Statement_map classes.
        PREP_STMT replaced with Statement (Prepared_statement) and moved to
        sql_prepare.cc
      sql/sql_parse.cc:
        thd->init_for_queries() doesn't exist any more
        comment moved to proper place
      sql/sql_prepare.cc:
        PREP_STMT replaced with Prepared_statement
        minor code cleanups
      tests/client_test.c:
        Later in the test we rely on order of rows, which normally is not defined.
        My patch changes the order.
      32c6b0d7
    • unknown's avatar
      Fixed memory overrun bug in DELETE ... ORDER BY · 7592a736
      unknown authored
      7592a736