An error occurred fetching the project authors.
- 28 Jun, 2005 1 commit
-
-
unknown authored
This fixed a failure of insert_update.test on some platforms mysys/thr_alarm.c: Fixed problem noticed by valgrind sql/opt_range.cc: Simple optimization for common case sql/sql_base.cc: Safety assert sql/sql_insert.cc: Added comment
-
- 27 Jun, 2005 1 commit
-
-
unknown authored
#9728 'Decreased functionality in "on duplicate key update #8147 'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE' This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part mysql-test/r/insert_select.result: More tests for bug #9728 and #8147 mysql-test/r/insert_update.result: Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works mysql-test/t/insert_select.test: More tests for bug #9728 and #8147 mysql-test/t/insert_update.test: Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works mysys/my_access.c: Cleanup (shorter loop variable names) sql/ha_ndbcluster.cc: Indentation fixes sql/item.cc: Remove item_flags sql/item.h: Remove item_flags sql/mysql_priv.h: New arguments to mysql_prepare_insert sql/sql_base.cc: Remove old fix for bug #8147 sql/sql_insert.cc: Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE sql/sql_parse.cc: Revert fix for #9728 Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause sql/sql_prepare.cc: New arguments to mysql_prepare_insert sql/sql_yacc.yy: Revert bug fix for #9728
-
- 21 Jun, 2005 1 commit
-
-
unknown authored
Temporary field wasn't restored to default values after ON DUPLICATE KEY UPDATE event, which results in wrong data being inserted in new record. sql/sql_insert.cc: Fix bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produces bad results mysql-test/t/insert_select.test: Test case for bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produces bad results mysql-test/r/insert_select.result: Test case for bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produces bad results
-
- 20 Jun, 2005 1 commit
-
-
unknown authored
INSERT ... SELECT with UNION" (reviewed version). Altough bug manifest itself only starting from 5.0 it is better to apply fix to 4.1 to keep some assumptions true and make code more future-proof. mysql-test/r/ps.result: Added test case for bug #11060 "Server crashes on re-execution of prepared INSERT ... SELECT with UNION". mysql-test/t/ps.test: Added test case for bug #11060 "Server crashes on re-execution of prepared INSERT ... SELECT with UNION". sql/sql_insert.cc: select_insert::prepare(): Item::fix_fields() methods operate assuming that LEX::current_select points to the select to which current item belongs. Thus during check_insert_fields() routine execution LEX::current_select should point ot the first select in query since this is the select with which items in insert list is associated. But if we have INSERT SELECT UNION SELECT type of query LEX::current_select will point to the fake_select_lex instead since select_insert::prepare() is called during processing of JOIN which corresponds to this select_lex. So we have set LEX::current_select before calling check_insert_fields() and restore it afterwards.
-
- 03 Jun, 2005 1 commit
-
-
unknown authored
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable mysql-test/r/func_gconcat.result: Move innodb specific test to innodb.test Changed table name r2 -> t2 More test to see how ROLLUP was optimized mysql-test/r/innodb.result: Moved test here form func_gconcat mysql-test/r/olap.result: New test results after optimization mysql-test/t/func_gconcat.test: Move innodb specific test to innodb.test Changed table name r2 -> t2 More test to see how ROLLUP was optimized mysql-test/t/innodb.test: Moved test here form func_gconcat sql/field.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_berkeley.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_blackhole.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_heap.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_innodb.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_isam.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_isammrg.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_myisam.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_myisammrg.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_ndbcluster.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/handler.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/hash_filo.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_cmpfunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_func.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place Ensure that 'null_value' is not accessed before val() is called sql/item_geofunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_strfunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_subselect.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_sum.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_timefunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_uniq.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/log_event.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/mysql_priv.h: Change key_map_full to not be const as we are giving it a proper value on startup sql/mysqld.cc: Move key_map variables here and initialize key_map_full properly sql/opt_range.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/opt_range.h: Fix that test_quick_select() works with any ammount of keys sql/procedure.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/protocol.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/protocol_cursor.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/set_var.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_analyse.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_class.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_crypt.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_insert.cc: Fixed that max_rows is ulong sql/sql_list.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_map.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_olap.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_select.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place Fixed that ROLLUP don't have to always create a temporary table Added new argument to remove_const() to make above possible Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP sql/sql_string.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_table.cc: Simple optimizations Fixed wrong checking of build_table_path() in undef-ed code sql/sql_udf.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_yacc.yy: removed extra {}
-
- 02 Jun, 2005 1 commit
-
-
unknown authored
Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed a number of dumb things in ha_tina. client/mysqladmin.cc: gcc 4.0 fix sql/examples/ha_archive.cc: Bunch of little cleanups from -Wall and gcc 4.0 fixes sql/examples/ha_example.cc: Noticed that the error call was not quite right. sql/examples/ha_tina.cc: Bunch of cleanups (many of which were quite dumb of me... and I have no earthly idea how they missed everyone's notice). sql/ha_heap.cc: Removed unused variable (-Wall find) sql/item_subselect.cc: Removed unused label. sql/mysqld.cc: Cleanup of unused function and gcc 4.0 bit. sql/opt_range.h: Cleanup for gcc 4.0 sql/repl_failsafe.cc: Cleanup for gcc 4.0 sql/slave.cc: Cleanup for gcc 4.0 sql/sql_acl.cc: Cleanup for gcc 4.0 sql/sql_insert.cc: Cleanedup for gcc 4.0 sql/sql_parse.cc: Cleanedup for gcc 4.0 sql/sql_repl.cc: Removed unused variable sql/sql_select.cc: Cleanedup for gcc 4.0
-
- 31 May, 2005 1 commit
-
-
unknown authored
1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES. Used the new option in create_table_from_items(). It is necessary to prevent the SELECT table from being reopend. It would get new storage assigned for its fields, while the SELECT part of the command would still use the old (freed) storage. 2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands against a global read lock. This prevents a deadlock in CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK and avoids the creation of new tables during a global read lock. 3.) Replaced set_protect_against_global_read_lock() and unset_protect_against_global_read_lock() by wait_if_global_read_lock() and start_waiting_global_read_lock() in the INSERT DELAYED handling. mysql-test/r/create.result: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added test results. mysql-test/t/create.test: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added tests which do not require concurrency. sql/lock.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES. Changed the parameter list. Removed two unnecessary functions. Their functionality is included in wait_if_global_read_lock() and start_waiting_global_read_lock(). sql/mysql_priv.h: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Changed the declaration of mysql_lock_tables(). Added definitions for the new options. sql/sql_acl.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_base.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_handler.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_insert.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Replaced set_protect_against_global_read_lock() and unset_protect_against_global_read_lock() by wait_if_global_read_lock() and start_waiting_global_read_lock() in the INSERT DELAYED handling. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_parse.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Protected the CREATE TABLE and CREATE TABLE ... SELECT commands against a global read lock. This prevents a deadlock in CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK and avoids the creation of new tables during a global read lock. sql/sql_table.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. Used the new option in create_table_from_items().
-
- 18 May, 2005 1 commit
-
-
unknown authored
After review version. Added a condition for MERGE tables. These do not have unique indexes. But every key could be a unique key on the underlying MyISAM table. So get the maximum key length for MERGE tables instead of the maximum unique key length. This is used for buffer allocation in write_record(). mysql-test/r/merge.result: Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE The test result. mysql-test/t/merge.test: Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE The test case does not in all cases show the problem without the bugfix. The improper memory allocation might get through undetected in many cases. sql/ha_myisammrg.h: Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE Set a table_flag for the MERGE engine telling that any index might be unique without being specified as such. sql/handler.h: Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE Added a new table_flag telling that any index might be unique without being specified as such. sql/sql_insert.cc: Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE Changed the freeing of the memory to be symmetric to its allocation (my_safe_alloc -> my_safe_afree). This is not directly related to the bug. sql/table.cc: Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE Added a condition for MERGE tables. These do not have unique indexes. But every key could be a unique key on the underlying MyISAM table. So get the maximum key length for MERGE tables instead of the maximum unique key length. This is used for buffer allocation in write_record().
-
- 07 May, 2005 1 commit
-
-
unknown authored
INSERT IGNORE...UPDATE causes break in protocol or unknown error message. Fix so that protocol doesn't break by properly ignoring dups. mysql-test/r/insert_update.result: Test for Bug#9725 mysql-test/t/insert_update.test: Test for Bug#9725 sql/sql_insert.cc: Ignore the failure in update_row when IGNORE is set. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
-
- 27 Apr, 2005 2 commits
-
-
unknown authored
After merge fix.
-
unknown authored
Added protection against global read lock while creating and initializing a delayed insert handler. Allowed to ignore a global read lock when locking the table inside the delayed insert handler. Added some minor improvements. sql/lock.cc: Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock Changed mysql_lock_tables() to allow for ignoring global read lock. Added functions to set/unset protection against global read lock. sql/mysql_priv.h: Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock Changed existing and added new function declarations. sql/sql_insert.cc: Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock Added and extended some comments. Added a protection against global read lock while a handler is created and initialized. Moved the unlock of the delayed insert object past its last usage in delayed_get_table(). Changed the table locking in handle_delayed_insert() so that it does not wait for global read lock.
-
- 26 Apr, 2005 1 commit
-
-
unknown authored
mysys/default.c: Cleanup: - Just test once for recursion level - Don't test explicitely for \r or \n as my_isspace() already does that sql/sql_insert.cc: Fix argument sql/sql_select.cc: Fixed indentation added comment
-
- 22 Apr, 2005 1 commit
-
-
unknown authored
A fix of the original patch. Correctly clear a bit from an enum value.
-
- 21 Apr, 2005 1 commit
-
-
unknown authored
-
- 19 Apr, 2005 1 commit
-
-
unknown authored
Modified the check for the timestamp field so that the flags for the automatic for inserts and updates are cleared independently. mysql-test/r/type_timestamp.result: Bug#7806 - insert on duplicate key and auto-update of timestamp The test result. mysql-test/t/type_timestamp.test: Bug#7806 - insert on duplicate key and auto-update of timestamp The test case. sql/mysql_priv.h: Bug#7806 - insert on duplicate key and auto-update of timestamp Made check_insert_fields() static. It is used only in sql_insert.cc. sql/sql_insert.cc: Bug#7806 - insert on duplicate key and auto-update of timestamp Modified the check of the insert fields so that an explicit assignment of the timestamp field does only disable the automatic for inserts and retains the automatic for updates. Added a check if the update fields contain the timestamp field. In this case, the automatic on update is disabled, but not the automatic on insert. This is called from mysql_prepare_insert(). sql/table.h: Bug#7806 - insert on duplicate key and auto-update of timestamp Extended a comment to warn about usage of enum timestamp_auto_set_type.
-
- 28 Feb, 2005 1 commit
-
-
unknown authored
(No really critical errors found, but a few possible wrong results) innobase/dict/dict0dict.c: Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string mysql-test/r/select_found.result: Add missing drop table mysql-test/r/type_set.result: More tests mysql-test/t/select_found.test: Add missing drop table mysql-test/t/type_set.test: More tests mysys/my_init.c: Avoid warning from purify (purify doesn't handle getrusage() properly) sql/field.h: enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters sql/filesort.cc: enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters sql/item_cmpfunc.cc: Fixed warning from purify. (Not critical as the arguments are passed to a function but not used) Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization sql/mysqld.cc: Wait for signal handler to stop when running --bootstrap (Fixes warning from purify) sql/sql_insert.cc: Initialize slot used by innodb.cc (not critical) sql/sql_lex.h: Better comments sql/sql_repl.cc: memcmp -> bcmp() to avoid warning from purify sql/sql_select.cc: Fix for out-of-bound memory reference when doing DISTINCT on const expressions strings/ctype-simple.c: Fixes to not access uninitialized memory (Not critical)
-
- 25 Jan, 2005 1 commit
-
-
unknown authored
-
- 31 Dec, 2004 1 commit
-
-
unknown authored
This allows use to use INSERT IGNORE ... ON DUPLICATE ... mysql-test/r/drop.result: safety fix mysql-test/t/drop.test: safety fix mysql-test/t/multi_update.test: ensure we cover all possible errors sql/log_event.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/log_event.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/mysql_priv.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_class.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_delete.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_insert.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_lex.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_lex.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_load.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_parse.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_repl.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_repl.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_select.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_table.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_union.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_update.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_yacc.yy: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
-
- 24 Dec, 2004 1 commit
-
-
unknown authored
sql/sql_insert.cc: cleanup
-
- 13 Dec, 2004 1 commit
-
-
unknown authored
UPDATE clause conflicts with SELECT for use of item_list field. Alter UPDATE clause to use new lex field update_list Tests included mysql-test/r/insert_update.result: WL#2274 New tests for INSERT..SELECT..UPDATE mysql-test/t/insert_update.test: WL#2274 New tests for INSERT..SELECT..UPDATE sql/mysql_priv.h: Remove function - insert_select_precheck() sql/sql_class.h: WL#2274 New constructor for class select_insert sql/sql_insert.cc: WL#2274 Move code into mysql_prepare_insert Add checks as param values may be NULL sql/sql_lex.cc: WL#2274 initialize lex->update_list sql/sql_lex.h: WL#2274 New field in LEX: update_list sql/sql_parse.cc: WL#2274 INSERT..UPDATE clause now populates lex->update_list Remove redundant function: insert_select_precheck() sql/sql_prepare.cc: WL#2274 invoke insert_precheck() instead of insert_select_precheck() sql/sql_yacc.yy: WL#2274 Enable INSERT..SELECT..UPDATE syntax New rule - insert_update_list, to populate lex->update_list
-
- 09 Dec, 2004 1 commit
-
-
unknown authored
tables requires privileges for them if some table or column level grants present" (with after-review fixes). We should set SELECT_ACL for implicitly opened tables in my_tz_check_n_skip_implicit_tables() to be able to bypass privilege checking in check_grant(). Also we should exclude those tables from privilege checking in multi-update. mysql-test/r/timezone2.result: Extended test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone tables" Added test for bug #6765 "Implicit access to time zone description tables requires privileges for them if some table or column level grants present" mysql-test/t/timezone2.test: Extended test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone tables" Added test for bug #6765 "Implicit access to time zone description tables requires privileges for them if some table or column level grants present" sql/item_geofunc.cc: sql_acl.h is now included via mysql_priv.h sql/item_strfunc.cc: sql_acl.h is now included via mysql_priv.h sql/log.cc: sql_acl.h is now included via mysql_priv.h sql/mysql_priv.h: Now we have to include sql_acl.h before tztime.h, since my_tz_check_n_skip_implicit_tables() defined there requires SELECT_ACL constant defined in sql_acl.h. sql/mysqld.cc: sql_acl.h is now included via mysql_priv.h sql/repl_failsafe.cc: sql_acl.h is now included via mysql_priv.h sql/set_var.cc: sql_acl.h is now included via mysql_priv.h sql/sql_acl.cc: sql_acl.h is now included via mysql_priv.h sql/sql_base.cc: sql_acl.h is now included via mysql_priv.h sql/sql_cache.cc: sql_acl.h is now included via mysql_priv.h sql/sql_class.cc: sql_acl.h is now included via mysql_priv.h sql/sql_db.cc: sql_acl.h is now included via mysql_priv.h sql/sql_derived.cc: sql_acl.h is now included via mysql_priv.h sql/sql_do.cc: sql_acl.h is now included via mysql_priv.h sql/sql_insert.cc: sql_acl.h is now included via mysql_priv.h sql/sql_parse.cc: check_one_table_access(): Tweaked comments. multi_update_precheck(): Added skipping of implicitly opened tables during privilege checking. sql/sql_prepare.cc: sql_acl.h is now included via mysql_priv.h sql/sql_repl.cc: sql_acl.h is now included via mysql_priv.h sql/sql_show.cc: sql_acl.h is now included via mysql_priv.h sql/sql_update.cc: sql_acl.h is now included via mysql_priv.h sql/sql_yacc.yy: sql_acl.h is now included via mysql_priv.h sql/tztime.h: my_tz_check_n_skip_implicit_tables(): We should set SELECT_ACL for implictly opened tables to be able to bypass privilege checking in check_grant().
-
- 03 Dec, 2004 2 commits
-
-
unknown authored
Bug #6284 - report truncation warnings in INSERT ... SELECT only for "INSERT" part sql/sql_insert.cc Bug #6284 - report truncation warnings in INSERT ... SELECT only for "INSERT" part sql/sql_class.h: Bug #6284 - report truncation warnings in INSERT ... SELECT only for "INSERT" part sql/sql_insert.cc: Bug #6284 - report truncation warnings in INSERT ... SELECT only for "INSERT" part
-
unknown authored
CREATE DATABASE statement used the current database instead of the database created when checking conditions for replication. CREATE/DROP/ALTER DATABASE statements are now replicated based on the manipulated database. mysql-test/t/rpl_until.test: Longer sleep to allow slave to stop. mysql-test/t/rpl_charset.test: Position change in binary file. mysql-test/r/drop_temp_table.result: Position change in binlog. mysql-test/r/rpl_loaddata_rule_m.result: Position change in binlog. mysql-test/r/rpl_charset.result: Position change in binlog. sql/log_event.h: Added new flag and parameter to suppress generation of USE statements. sql/log_event.cc: Added parameter and code to suppress generation of USE statements. sql/sql_db.cc: Suppress generation of USE before CREATE/ALTER/DROP DATABASE statements. sql/log.cc: Query_log_event have new extra parameter. sql/sql_table.cc: Query_log_event have new extra parameter. sql/sql_base.cc: Query_log_event have new extra parameter. sql/sql_update.cc: Query_log_event have new extra parameter. sql/sql_insert.cc: Query_log_event have new extra parameter. sql/sql_rename.cc: Query_log_event have new extra parameter. sql/sql_delete.cc: Query_log_event have new extra parameter. sql/sql_acl.cc: Query_log_event have new extra parameter. sql/handler.cc: Query_log_event have new extra parameter. sql/item_func.cc: Query_log_event have new extra parameter. sql/sql_parse.cc: Query_log_event have new extra parameter.
-
- 02 Dec, 2004 1 commit
-
-
unknown authored
insertion of new records partially failed. It would get logged because of the logic to log a partially-failed 'INSERT ... SELECT' (which can't be rolled back in non-transactional tables), but 'CREATE TABLE ... SELECT' is always rolled back on failure, even for non-transactional tables. (Bug #6682) (Original fix reimplemented after review by Serg and Guilhem.) mysql-test/t/insert_select.test: Add test case for Bug #6682 mysql-test/r/insert_select.result: Add results for test case for Bug #6682 sql/sql_table.cc: moved tmp_disable_binlog() and reenable_binlog macros to sql/sql_class.h sql/sql_insert.cc: disable binlog during call to super's ::send_error in select_create class sql/sql_class.h: add select_create::send_error() BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
-
- 18 Nov, 2004 1 commit
-
-
unknown authored
-
- 07 Nov, 2004 1 commit
-
-
unknown authored
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root. This gives us the following benefits: - Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases) - Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT) - We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root client/mysqltest.c: Remove some not needed defines (Things like this should be done in config-win.h) include/config-win.h: Added popen() and pclose() compatibility macros mysql-test/t/rpl_failed_optimize-master.opt: Portability fix sql/ha_berkeley.cc: New thd->memroot handling sql/item_cmpfunc.cc: Simpler arena swapping code sql/item_func.cc: Simpler arena swapping code sql/item_subselect.cc: Simpler arena swapping code New thd->mem_root handling sql/item_sum.cc: New thd->mem_root handling sql/item_timefunc.cc: Fixed not-initalized usage errors found by valgrind sql/log_event.cc: New thd->mem_root handling sql/mysql_priv.h: New thd->mem_root handling sql/mysqld.cc: New thd->mem_root handling sql/opt_range.cc: New thd->mem_root handling sql/repl_failsafe.cc: New thd->mem_root handling sql/set_var.cc: New thd->mem_root handling sql/sql_acl.cc: New thd->mem_root handling sql/sql_base.cc: Simpler arena swapping code New thd->mem_root handling sql/sql_class.cc: New thd->mem_root handling sql/sql_class.h: Simpler arena swapping code New thd->mem_root handling sql/sql_db.cc: New thd->mem_root handling sql/sql_error.cc: New thd->mem_root handling sql/sql_help.cc: New thd->mem_root handling sql/sql_insert.cc: New thd->mem_root handling sql/sql_parse.cc: New thd->mem_root handling Added some extra checking of return value of new sql/sql_prepare.cc: New thd->mem_root handling sql/sql_select.cc: New thd->mem_root handling sql/sql_select.h: New thd->mem_root handling sql/sql_union.cc: Simpler arena swapping code sql/sql_yacc.yy: New thd->mem_root handling sql/table.cc: New thd->mem_root handling sql/thr_malloc.cc: New thd->mem_root handling tests/client_test.c: Added drop table to some tests Changed some table names to 't1'
-
- 27 Oct, 2004 1 commit
-
-
unknown authored
innobase/srv/srv0srv.c: after merge fix sql/set_var.cc: after merge fix sql/sql_cache.cc: after merge fix
-
- 26 Oct, 2004 1 commit
-
-
unknown authored
New mysqltest that can run mysqltest with PS Added support for ZEROFILL in PS Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result() Updated test cases to support --ps-protocol (Some tests are still run using old protocol) Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2... Fixed crash in PS when using sub queries Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries) Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new PS query group_concat(...ORDER BY) didn't work with PS Fixed problem with test suite when not using innodb BitKeeper/deleted/.del-innodb-lock-master.opt~f76a4a1999728f87: Delete: mysql-test/t/innodb-lock-master.opt client/Makefile.am: mysqltest now uses regex client/mysqltest.c: Added support for testing of prepared statements (with --ps-protocol) Main code was done by Kent, I did mainly some cleanups and minor bug fixes New test commands: --disable_ps_protocol --enable_ps_protocol NOTE: new code still has some things that needs to be cleaned up. For example run_query_stmt_handle_error() should be made more general so that same code can be used also by 'normal' queries configure.in: mysqltest now uses regex libmysql/libmysql.c: Reset warning_count after prepare (safety). In the future we should also provide warnings on prepare integer -> string conversion now handles ZEROFILL double -> string conversion is now closer to the one in the server Fixed crash when one called mysql_stmt_store_result() without preceding mysql_stmt_bind_result() libmysqld/examples/Makefile.am: mysqltest now uses regex mysql-test/include/have_query_cache.inc: Fixes for --ps-protocol mysql-test/include/ps_conv.inc: Fixes for --ps-protocol mysql-test/mysql-test-run.sh: Added options --ps-protocol mysql-test/r/ctype_utf8.result: Fixed test case mysql-test/r/fulltext_cache.result: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/r/fulltext_left_join.result: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/r/fulltext_multi.result: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/r/innodb-lock.result: Fixed test to work even if Innodb is not compiled in. mysql-test/t/create.test: Fixes for --ps-protocol mysql-test/t/ctype_utf8.test: Remove warnings mysql-test/t/date_formats.test: Fixes for --ps-protocol mysql-test/t/fulltext_cache.test: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/t/fulltext_left_join.test: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/t/fulltext_multi.test: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/t/func_group.test: Fixes for --ps-protocol mysql-test/t/func_sapdb.test: Fixes for --ps-protocol mysql-test/t/innodb-lock.test: Fixed test to work even if Innodb is not compiled in. mysql-test/t/insert.test: Fixes for --ps-protocol mysql-test/t/insert_select.test: Fixes for --ps-protocol mysql-test/t/insert_update.test: Fixes for --ps-protocol mysql-test/t/metadata.test: Fixes for --ps-protocol mysql-test/t/multi_statement.test: Fixes for --ps-protocol mysql-test/t/ps_1general.test: Fixes for --ps-protocol mysql-test/t/rollback.test: Fixes for --ps-protocol mysql-test/t/rpl_redirect.test: Fixes for --ps-protocol mysql-test/t/rpl_user_variables.test: Fixes for --ps-protocol mysql-test/t/select.test: Fixes for --ps-protocol mysql-test/t/status.test: Fixes for --ps-protocol mysql-test/t/type_blob.test: Fixes for --ps-protocol mysql-test/t/type_float.test: Fixes for --ps-protocol mysql-test/t/union.test: Fixes for --ps-protocol mysql-test/t/warnings.test: Fixes for --ps-protocol mysys/my_alloc.c: More debugging information sql-common/client.c: More debugging information sql-common/my_time.c: TIME didn't support full range with PS sql/field.cc: TIME didn't support full range with PS sql/item_cmpfunc.cc: IN(constants,...) didn't work with PS sql/item_subselect.cc: Some subqueries didn't work with PS sql/item_sum.cc: group_concat(...ORDER BY) didn't work with PS Removed variable warning_available as 'warning' can be used for this. sql/item_sum.h: Removed not needed variable sql/protocol.cc: TIME didn't support full range with PS sql/set_var.cc: Style fix sql/sql_base.cc: setup_wild() didn't properly restore old arena, which caused core dump in PS when using SELECT * FROM t1 NATURAL JOIN t2... sql/sql_class.cc: Style fix sql/sql_error.cc: Style fix sql/sql_insert.cc: Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" sql/sql_lex.h: Fix for PS and procedures sql/sql_parse.cc: More debugging information Make a copy of 'db' in PS as this may change Fixed wrong permissions check in PS and multi-table updates sql/sql_prepare.cc: Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new query sql/sql_union.cc: Fixes for PS and SELECT ... PROCEDURE Reset 'with_wild' as 'wild' is resolved on prepare
-
- 01 Oct, 2004 1 commit
-
-
unknown authored
column types TIMESTAMP is NOT NULL by default, so in order to have TIMESTAMP column holding NULL valaues you have to specify NULL as one of its attributes (this needed for backward compatibility). Main changes: Replaced TABLE::timestamp_default_now/on_update_now members with TABLE::timestamp_auto_set_type flag which is used everywhere for determining if we should auto-set value of TIMESTAMP field during this operation or not. We are also use Field_timestamp::set_time() instead of handler::update_timestamp() in handlers. mysql-test/r/type_timestamp.result: Added test for TIMESTAMP columns which are able to store NULL values. mysql-test/t/type_timestamp.test: Added test for TIMESTAMP columns which are able to store NULL values. sql/field.cc: Added support for TIMESTAMP fields holding NULL values. We don't need Field_timestamp::set_timestamp_offsets() anymore. Instead we need Field_timestamp::get_auto_set_type() function which will convert TIMESTAMP auto-set type stored in Field in unireg_check to value from timestamp_auto_set_type_enum. (We can't replace this function with additional Field_timestamp member and some code in constructor because then we will have troubles with Field::new_field() method). We should also set field to not null in Field_timestamp::set_time() now. sql/field.h: Added support for TIMESTAMP fields holding NULL values. We don't need Field_timestamp::set_timestamp_offsets() anymore. Instead we need Field_timestamp::get_auto_set_type() function, which will convert TIMESTAMP auto-set type stored in Field in unireg_check to value from timestamp_auto_set_type_enum. We also have to support NULL values in Field_timestamp::get_timestamp() function. sql/field_conv.cc: Added comment clarifying behavior in case of TIMESTAMP fields which are able to store NULL values. sql/ha_berkeley.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_heap.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_innodb.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_isam.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_isammrg.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_myisam.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_myisammrg.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/ha_ndbcluster.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now for determining if we should auto-set value of TIMESTAMP field during this operation. We are also use Field_timestamp::set_time() instead of handler::update_timestamp(). sql/handler.cc: handler::update_timestamp() is no longer needed since now we use Field_timestamp::set_time() instead. (we can't use handler::update_timestamp() anyway since field position only is not enough for TIMESTAMP fields which are able to store NULLs) sql/handler.h: handler::update_timestamp() is no longer needed since now we use Field_timestamp::set_time() instead. sql/item_timefunc.cc: Since now TIMESTAMP fields can hold NULL values we should take this into account. sql/sql_base.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now. (Here we use Field_timestamp::get_auto_set_type() to setup its value before further statement execution). sql/sql_insert.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now. sql/sql_load.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now. sql/sql_parse.cc: Added support for TIMESTAMP fields holding NULL values. We should distinguish NULL default values and non-specified default values for such fields (because latter could mean DEFAULT NOW() ON UPDATE NOW() in some cases). sql/sql_show.cc: Added support for TIMESTAMP fields holding NULL values. Unlike all other fields these are NOT NULL by default so we have to specify NULL attribute explicitly for them. sql/sql_table.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now. sql/sql_update.cc: Now we use TABLE::timestamp_field_type instead of TABLE::timestamp_default_now/on_update_now. sql/sql_yacc.yy: Added support for TIMESTAMP fields holding NULL values. Unlike all other fields these are NOT NULL by default (so we have to set NOT_NULL_FLAG properly for them). sql/table.h: Added timestamp_auto_set_type enum which values are used for indicating during which operations we should automatically set TIMESTAPM field value to current timestamp. TABLE: Replaced timestamp_default_now/on_update_now members with timestamp_auto_set_type flag (Now when TIMESTAMP field are able to store NULL values, single position of field in record is not enough for updating this field anyway).
-
- 24 Aug, 2004 1 commit
-
-
unknown authored
execute crashes server": we were deleting lex->result after each execute, but prepared statements assumed that it's left intact. The fix adds cleanup() method to select_result hierarchy, so that result objects can be reused. Plus we now need to delete result objects more wisely. mysql-test/r/ps.result: Test results fixed: test case for bug#5034 mysql-test/t/ps.test: A test case for bug#5034, few followups sql/sql_class.cc: - fix warning in THD::THD - implementation of cleanup() for select_result hierarchy - select_export::send_eof was identical to select_dump::send_eof: moved to the base class select_to_file. - Statement::end_statement() to end lex, free items, and delete possible select_result sql/sql_class.h: - select_result::cleanup() declaration - sql/sql_insert.cc: - implementation of select_insert::cleanup(): currently we always create a new instance of select_insert/ select_create on each execute. sql/sql_lex.cc: - with more complicated logic of freeing lex->result it's easier to have it non-zero only if it points to a valid result. sql/sql_lex.h: Now st_lex::st_lex is not empty. sql/sql_parse.cc: mysql_execute_command(): - delete select_result *result only if it was created in this function. - use end_statement() to cleanup lex and thd in the end of each statement. - no need to save THD::lock if this is explain. This save apparently left from times when derived tables were materialized here, not in open_and_lock_tables. sql/sql_prepare.cc: - call result->cleanup() in reset_stmt_for_execute - now Statement is responsible for freeing its lex->result. sql/sql_select.cc: handle_select(): - don't delete result, it might be needed for next executions - result is never null
-
- 18 Jul, 2004 1 commit
-
-
unknown authored
The problem was that (for any storage engine), the created temporary table was not removed if CREATE SELECT failed (because of a constraint violation for example). This was not consistent with the manual and with CREATE SELECT (no TEMPORARY). sql/sql_insert.cc: Fix for BUG#4551 "Temporary InnoDB tables not replicated properly with CREATE TABLE .. SELECT" The problem was that (for any storage engine), the created temporary table was not removed if CREATE SELECT failed (because of a constraint violation for example). This was not consistent with the manual and with CREATE SELECT (no TEMPORARY). And it led to the above bug, because the binlogging of CREATE SELECT is done by select_insert::send_eof() (same function as INSERT SELECT) and so, if the table is transactional and there is a failure, the statement is considered as rolled back and so nothing is written in the binlog. So temp table MUST be deleted.
-
- 25 Jun, 2004 1 commit
-
-
unknown authored
include/mysql.h: Cleanup sql-common/client.c: Allow client.c to compile after changes to mysql.h sql/opt_range.cc: Make bdb.test repeatable (and assume that table scans is a little bit slower) sql/sql_handler.cc: Fixed typo during merge sql/sql_insert.cc: Fixed indentation
-
- 23 Jun, 2004 1 commit
-
-
unknown authored
more logical table/index_flags return HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate max_keys and other limits renamed to max_supported_keys/etc max_keys/etc are now wrappers to max_supported_keys/etc ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing include/myisam.h: increasing myisam_max_temp_file_length include/my_base.h: handler interface cleanup myisam/mi_static.c: warning removed mysql-test/Makefile.am: followup mysql-test/r/fulltext.result: fulltext indexes are not ordered mysql-test/r/rpl_user_variables.result: followup sql/field.cc: index_flags sql/filesort.cc: rnd_init -> ha_rnd_init rnd_end -> ha_rnd_end sql/ha_berkeley.cc: cleanup sql/ha_berkeley.h: table/index_flags revamped sql/ha_heap.cc: ensure index is accessed only after index_init (esp. important for temp tables) sql/ha_heap.h: table/index_flags revamped sql/ha_innodb.cc: don't workaround MySQL sloppiness sql/ha_innodb.h: table/index_flags revamped sql/ha_isam.h: table/index_flags revamped sql/ha_isammrg.h: table/index_flags revamped sql/ha_myisam.cc: ensure index is accessed only after index_init (esp. important for temp tables) sql/ha_myisam.h: table/index_flags revamped sql/ha_myisammrg.h: table/index_flags revamped sql/handler.cc: handler interface cleanups sql/handler.h: handler interface cleanups: more logical table/index_flags return HA_ERR_WRONG_COMMAND instead of abstract methods max_keys and other limits renamed to max_supported_keys/etc max_keys/etc are now wrappers to max_supported_keys/etc ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to enforce strict pairing sql/item_subselect.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/lex.h: renamed to avoid conflicts sql/opt_range.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed table/index_flags cleanup sql/opt_range.h: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/opt_sum.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed table/index_flags cleanup sql/records.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/sql_acl.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/sql_cache.cc: cleanup sql/sql_delete.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/sql_handler.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/sql_help.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/sql_insert.cc: table/index_flags cleanup sql/sql_select.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed table/index_flags cleanup sql/sql_table.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed table/index_flags cleanup sql/sql_update.cc: index_init/index_end/rnd_init/rnd_end strict pairing fixed sql/sql_yacc.yy: INDEX -> INDEX_SYM sql/table.cc: table/index_flags cleanup
-
- 18 Jun, 2004 1 commit
-
-
unknown authored
Added basic per-thread time zone functionality (based on public domain elsie-code). Now user can select current time zone (from the list of time zones described in system tables). All NOW-like functions honor this time zone, values of TIMESTAMP type are interpreted as values in this time zone, so now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE (or proper PostgresSQL type). WL#1266 "CONVERT_TZ() - basic time with time zone conversion function". Fixed problems described in Bug #2336 (Different number of warnings when inserting bad datetime as string or as number). This required reworking of datetime realted warning hadling (they now generated at Field object level not in conversion functions). Optimization: Now Field class descendants use table->in_use member instead of current_thd macro. include/my_global.h: Added macro for reading of 32-bit ints stored in network order from unaligned memory location. include/mysqld_error.h: Added error-code for invalid timestamp warning and error-code for wrong or unknown time zone specification. libmysqld/Makefile.am: Added main per-thread time zone support file to libmysqld libmysqld/lib_sql.cc: Added initialization of time zones infrastructure to embedded server. mysql-test/r/connect.result: Updated test result since now mysql database contains more system tables. mysql-test/r/date_formats.result: Now when truncation occurs during conversion to datetime value we are producing Warnings instead of Notes. Also we are giving more clear warnings about this in some cases. mysql-test/r/func_sapdb.result: New warnings about truncation occured during conversion to datetime value added due their better handling. mysql-test/r/func_time.result: New warnings about truncation occured during conversion to datetime value added due their better handling. mysql-test/r/select.result: New warnings about truncation occured during conversion to datetime value added due their better handling. Also tweaked test a bit to made it less ambigious for reader. mysql-test/r/system_mysql_db.result: Updated test result because new system tables holding time zone descriptions were added. mysql-test/r/timezone.result: Updated timezone.test to use new system variable which shows system time zone. Added test of warning which is produced if someone tries to store non-existing (due falling into spring time-gap) datetime value into TIMESTAMP field. mysql-test/r/type_datetime.result: Separated and extended test of values and warnings produced for bad values stored in DATETTIME fields. mysql-test/r/type_time.result: Now we are producing more consistent warning when we are truncating datetime value while storing it in TIME field. mysql-test/r/type_timestamp.result: Separated and extended test of values and warnings produced for bad values stored in TIMESTAMP fields. mysql-test/t/select.test: Updated test to make it less ambigous for reader. mysql-test/t/timezone.test: Updated timezone.test to use new system variable which shows system time zone. Added test of warning which is produced if someone tries to store non-existing (due falling into spring time-gap) datetime value into TIMESTAMP field. mysql-test/t/type_datetime.test: Separated and extended test of values and warnings produced for bad values stored in DATETTIME fields. mysql-test/t/type_timestamp.test: Separated and extended test of values and warnings produced for bad values stored in TIMESTAMP fields. scripts/mysql_create_system_tables.sh: Added creation of tables with time zone descriptions. Also added descriptions of time zones used in tests. scripts/mysql_fix_privilege_tables.sql: Added mysql.time_zone* tables family. sql/Makefile.am: Added files implementing time zone support to server, also added rules for building of mysql_tzinfo_to_sql converter and test_time test. sql/field.cc: Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion. Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and any other Field to datetime conversion (now we are generating warnings no in lower level functions like in str_to_TIME() but in Field methods. This allows generate better and more consistent warnings and to reuse code of str_to_TIME() outside of server). Added 3rd parameter to set_warning() method to be able to not increment cut fields but still produce a warning. Also added set_datetime_warning() family of auxiliary methods which allow easier generate datetime related warnings. Also replaced occurences of current_thd with table->in_use member, added asserts for catching all places there we need to set table->in_use accordingly. Renamed fix_datetime() function to number_to_TIME() and moved it to sql/time.cc there it fits better. sql/field.h: Added comment about places where we can use table->in_use member instead of current_thd. Added 3rd parameter to Field::set_warning() method and set_datetime_warning() family of methods. sql/field_conv.cc: Field::set_warning() method with 2 arguments was replaced with more generic set_warning() method with 3 arguments. sql/ha_berkeley.cc: Now we set table->in_use for temporary tables so we have to use table->tmp_table for checking if table is temporary. sql/item.cc: Replaced calls to str_to_time() and str_to_TIME() funcs with their warning generating analogs. sql/item_create.cc: Added creation of CONVERT_TZ function as FUNC_ARG3. sql/item_create.h: Added creation of CONVERT_TZ function as FUNC_ARG3. sql/item_timefunc.cc: Added support of per-thread time zone to NOW-like and FROM_UNIXTIME, UNIX_TIMESTAMP functions. Added support for CONVERT_TZ function. Removed call to str_to_timestamp function which caused non-optimal behavior in certain cases. Replaced calls to str_to_time() function with its warning generating analog. sql/item_timefunc.h: Added support of per-thread time zone to NOW-like and FROM_UNIXTIME, UNIX_TIMESTAMP functions. Added support of CONVERT_TZ function. sql/lex.h: Added support of CONVERT_TZ function. sql/log.cc: Added support for replication of statements depending on time zone. sql/mysql_priv.h: Now including headers with per-thread time zone support functions and classes. Added portable replacement of time_t - my_time_t type. Added time zone as one of query distinguishing parameters for query cache. Fixed declarations of str_to_TIME, str_to_time and my_system_gmt_sec (former my_gmt_sec) since now they have one more out parameter which informs about wrong datetime value or data truncation during conversion. Added warning generating version of str_to_TIME() and str_to_time() functions. Thrown away str_to_datetime/timestamp functions since they are not needed any longer. Added number_to_TIME function. sql/mysqld.cc: Added per-thread time zone support initialization. Added new startup parameter --default-time-zone. sql/set_var.cc: Added support for per-thread time_zone variable. Renamed old timezone variable to system_time_zone. sql/set_var.h: Added support for per-thread time_zone variable. sql/share/czech/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/danish/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/dutch/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/english/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/estonian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/french/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/german/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/greek/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/hungarian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/italian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/japanese/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/korean/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/norwegian-ny/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/norwegian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/polish/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/portuguese/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/romanian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/russian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/serbian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/slovak/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/spanish/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/swedish/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/share/ukrainian/errmsg.txt: Added error message for barking when incorrect time zone name or specifiaction is provided and for warning about invalid TIMESTAMP values (e.g. falling into the spring time-gap). sql/slave.cc: In order to support replication of statements using time zones in 4.1 we should ensure that both master and slave have same default time zone. sql/sql_base.cc: Now we are setting TABLE::in_use member for all tables (which assume calls to Field::store or val_ methods). sql/sql_cache.cc: Added time zone as one more query distinguishing parameter for query cache. sql/sql_class.cc: Added THD::time_zone_used variable indicating that this query uses per thread time zone. sql/sql_class.h: Added per-thread time zone variable. Added THD::time_zone_used variable indicating that this query uses per thread time zone so if this is updating query the time zone should be logged to binlog. sql/sql_insert.cc: We should set TABLE::in_use member pointing to thread which is called INSERT DELAYED and not to worker thread. sql/sql_load.cc: Field::set_warning() now has one more argument now. sql/sql_parse.cc: Resetting THD::time_zone_used variable in the end of query processing. sql/sql_select.cc: Now we are setting TABLE::in_use member for all tables (which assume calls to Field::store or val_ methods). sql/sql_show.cc: Now using per thread time zone for extended show tables. sql/time.cc: Added support for per-thread time zones for TIMESTAMP type and reworked generation of warnings for TIMESTAMP and DATETIME types. (Introduced new TIME_to_timestamp() function. Removed hours normalisation from former my_gmt_sec() since it was not working and not used anywhere now, but breaks parameter constness, added to this function generation of warning if we are falling in spring time-gap. Removed str_to_timestamp and str_to_datetime functions which are no longer used. Moved fix_datetime function from sql/field.cc to this file as number_to_TIME() function. Added out parameter for str_to_TIME and str_to_time functions which indicates if value was truncated during conversion, removed direct generation of warnings from this functions.) sql/unireg.cc: Now we are setting TABLE::in_use member for all tables (which assume calls to Field::store or val_ methods). BitKeeper/etc/ignore: Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
-
- 01 Jun, 2004 1 commit
-
-
unknown authored
libmysqld/Makefile.am: Removed define that is now defined by configure and my_global.h mysql-test/r/func_gconcat.result: Fixed test result after removing end space sql/share/romanian/errmsg.txt: Fixed wrong error message sql/sql_insert.cc: Removed compiler warning
-
- 26 May, 2004 1 commit
-
-
unknown authored
Applied patches for Netware innobase/include/os0thread.h: Applied patches for Netware innobase/os/os0thread.c: Applied patches for Netware libmysql/libmysql.c: Applied patches for Netware libmysql/libmysql.def: Applied patches for Netware myisam/myisamchk.c: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable myisam/myisamdef.h: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable mysql-test/t/rpl_relayspace-slave.opt: Applied patches for Netware mysys/my_pthread.c: Applied patches for Netware mysys/my_static.h: Portability fix netware/BUILD/compile-linux-tools: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable netware/BUILD/mwenv: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable netware/BUILD/nwbootstrap: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable netware/my_manage.c: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable netware/mysql_fix_privilege_tables.pl: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable netware/mysql_test_run.c: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable netware/static_init_db.sql: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable scripts/make_binary_distribution.sh: Applied patches for Netware Changed prototype of killed_ptr() to make it more portable sql/filesort.cc: Changed prototype of killed_ptr() to make it more portable sql/ha_myisam.cc: Changed prototype of killed_ptr() to make it more portable sql/mysqld.cc: Fixed some typos for Netware sql/sql_bitmap.h: Applied patches for Netware sql/sql_class.h: Changed prototype of killed_ptr() to make it more portable sql/sql_insert.cc: safety fix strings/my_strtoll10.c: Added comment
-
- 24 May, 2004 1 commit
-
-
unknown authored
after Monty's review. - Item_param was rewritten. - it turns out that we can't convert string data to character set of connection on the fly, because they first should be written to the binary log. To support efficient conversion we need to rewrite prepared statements binlogging code first. include/my_global.h: Macro swap(a, b, c) was renamed to resolve name conflict with String::swap() method. include/my_sys.h: Added declaration of escape_string_for_mysql() include/mysql_com.h: Removed and moved back: a macro which is visible to libmysql user but has sence only in prepared statement protocol implementation. isam/_search.c: swap -> swap_variables isam/test2.c: swap -> swap_variables libmysql/libmysql.c: - sub_escape_string moved to mysys/charset.c to be visible in sql/ - few cleanups myisam/mi_test2.c: swap -> swap_variables mysys/charset.c: sub_escape_string was moved from libmysql.c to be able to use it in sql/ code. mysys/my_chsize.c: rename: swap -> swap_variables mysys/my_compress.c: swap -> swap_variables mysys/my_handler.c: swap -> swap_variables sql/field.cc: Field::store_time refactored to use TIME_to_string function from time.cc sql/item.cc: New implementation of Item_param class: added support for character sets conversion. sql/item.h: Item_param: - 'state' member introduced instead of many boolean variables. - put ltime, int_value and real_value into union to save space. - remove unimplemented members - set_value renamed to set_str sql/item_timefunc.cc: Refactored to use functions from time.cc sql/lock.cc: rename: swap -> swap_variables sql/mysql_priv.h: - added declarations for TIME_to_ulonglong_*, TIME_to_string functions - const specifiers for make_date, make_time, make_datetime arguments sql/opt_range.cc: rename: swap -> swap_variables sql/protocol.cc: - added character set conversion support to binary protocol. - Protocol::convert changed to point at shared buffer in THD. This lets us use one convert buffer for binary and simple protocol. The same buffer is used for client->server conversions in prepared statements code. - string conversion code refactored to Protocol::store_string_aux function. - few more comments sql/protocol.h: - Protocol::convert now points at THD::convert_buffer: we want to share one buffer between all protocol implementations. sql/sql_class.cc: - implementation of THD::convert_string using THD::convert_buffer (conversion of strings allocated in the system heap). sql/sql_class.h: - THD::convert_buffer is shared between THD and network Protocols and used for character set conversion of strings. - new function to convert String object from one charset to another using THD::convert_buffer sql/sql_insert.cc: A little fix in a comment. sql/sql_parse.cc: Shrink convert buffer in the end of each statement. sql/sql_prepare.cc: Many changes: - static specifier for set_param_* family of functions. - FIELD_TYPE -> MYSQL_TYPE - added set_param_binary as handler for BLOB types. - added character set support - added support for param typecode in mysql_stmt_get_longdata (mysql_stmt_send_long_data handler) - changes in Item_param deployed - few cleanups sql/sql_select.cc: rename: swap -> swap_variables sql/sql_string.cc: - String::append rewritten to support character set conversion for single-byte encodings. - added String::swap method to efficiently exchange two string objects. sql/sql_string.h: Declraration for String::swap(). sql/time.cc: - function TIME_to_string to convert TIME to String in default MySQL format - family of functions TIME_to_ulonglong_* tests/client_test.c: Test for support for character set conversions in prepared statements (binary and text data).
-
- 19 May, 2004 1 commit
-
-
unknown authored
Fixed wrong number of warnings/duplicates for machines with high-byte-first client/mysql.cc: Remove not used variables client/mysqltest.c: Remove double ; myisam/ft_nlq_search.c: Fix valgrind error (not fatal) myisam/rt_test.c: Portability fix mysql-test/r/rpl_trunc_binlog.result: Portability fix mysql-test/t/rpl_trunc_binlog.test: Portability fix (Column 23 was different on openbsd) sql/sql_insert.cc: Fixed wrong number of warnings/duplicates for machines with high-byte-first strings/ctype-big5.c: Portability fix strings/ctype-gbk.c: Portability fix strings/ctype-mb.c: Portability fix strings/ctype-uca.c: Portability fix tests/client_test.c: Portability fixes
-
- 05 May, 2004 1 commit
-
-
unknown authored
myisam/myisam_ftdump.c: VC++ compiler compability fix mysys/my_getsystime.c: Applied Sergei's code for Windows (still subject to changes by him) sql/handler.cc: VC++ compiler compability fix sql/item_geofunc.cc: Removed non-used variable sql/item_strfunc.cc: VC++ compiler compability fix sql/opt_range.cc: VC++ compiler compability fix sql/sql_insert.cc: VC++ compiler compability fix sql/sql_lex.cc: VC++ compiler compability fix sql/sql_parse.cc: VC++ compiler compability fix sql/sql_prepare.cc: VC++ compiler compability fix sql/sql_union.cc: Removed non-used variable and VC++ compiler compability fix
-
- 28 Apr, 2004 1 commit
-
-
unknown authored
Ensure that raid_chunks is not set to higher than 255 as this could cause problems with DROP DATABASE. (Bug #3182) mysql-test/r/raid.result: Test of raid_chunks > 255 mysql-test/t/raid.test: Test of raid_chunks > 255 sql/item.cc: Fixed wrong usage of str_value in Item::save_in_field This could caused a stack overrun with some very special INSERT ... SELECT ... GROUP BY queries where the GROUP BY value was an expression that generated a NULL value. (Bug #3265) The Item_copy_string::save_in_field() function is from 4.1 and helps optimized this case a bit sql/item.h: Fixed wrong usage of str_value in Item_copy_string::save_in_field sql/sql_insert.cc: More debug information sql/table.cc: Ensure that raid_chunks is not set to higher than 255 as this could cause problems with DROP DATABASE. Another problem with values > 255 is that in the .frm file we store the chunks value in one byte. (Bug #3182)
-