Commit graph

439 commits

Author SHA1 Message Date
unknown
26ecdbd024 log_event.cc:
After merge fix


sql/log_event.cc:
  After merge fix
2006-12-29 16:42:16 +04:00
unknown
76bd00a993 After merge fix for bug N22645
mysql-test/t/mysqlbinlog.test:
  After merge fix
sql/log_event.cc:
  Fixing comment, thanks to Andrei for suggestion
2006-12-14 16:31:23 +04:00
unknown
c8b678ac08 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b22645


mysql-test/t/disabled.def:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
mysql-test/r/mysqlbinlog.result:
  After merge fix
mysql-test/t/mysqlbinlog.test:
  After merge fix
2006-12-14 14:19:30 +04:00
unknown
df2af6cdf0 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug24507


client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-12-08 11:47:48 +01:00
unknown
c423ecc0a7 Bug#22645 LC_TIME_NAMES: Statement not replicated
Implementing event based replication of LC_TIME_NAMES for 5.0
(as a replacement of previously made ONE_SHOT replication)


mysql-test/r/mysqlbinlog.result:
  Fixing results
mysql-test/r/rpl_locale.result:
  Fixing results
mysql-test/t/disabled.def:
  Enabling rpl_locale
mysql-test/t/mysqlbinlog.test:
  Check "mysqlbinlog | mysql" reproduces lc_time_names correctly.
mysql-test/t/rpl_locale.test:
  Adding new test: that setting lc_time_names back to en_US works fine.
sql/log_event.cc:
  Implementing event based replication of LC_TIME_NAMES for 5.0
  (as a replacement of previously made ONE_SHOT replication)
sql/log_event.h:
  Adding new Q_*_CODE
  Adding "lc_time_names_number" members into Query_log_event and PRINT_EVENT_INFO
2006-12-07 09:31:53 +04:00
unknown
36c7cfd71e Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
Problem: when loading mysqlbinlog dumps, CREATE PROCEDURE having semicolons
in their bodies failed.
Fix: Using safe delimiter "/*!*/;" to dump log entries.


client/mysqlbinlog.cc:
  - Adding PRINT_EVENT_INFO argument to dump_xxx_log_entries()
  - Setting delimiter to "/*!*/;" before calling dump functions
mysql-test/r/ctype_ucs_binlog.result:
  Fixing test results
mysql-test/r/mix_innodb_myisam_binlog.result:
  Fixing test results
mysql-test/r/mysqlbinlog.result:
  Fixing test results
  Adding test case
mysql-test/r/mysqlbinlog2.result:
  Fixing test results
mysql-test/r/rpl_charset.result:
  Fixing test results
mysql-test/r/rpl_timezone.result:
  Fixing test results
mysql-test/r/user_var-binlog.result:
  Fixing test results
mysql-test/t/mix_innodb_myisam_binlog.test:
  Fixing LIKE expression
mysql-test/t/mysqlbinlog.test:
  Adding test case
sql/log_event.cc:
  Using print_event_info->delimiter instead of
  hard-coded semicolon as a query end marker.
sql/log_event.h:
  Adding new member to store delimiter.
2006-11-28 16:26:15 +04:00
unknown
8869653031 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/t/ctype_ucs.test:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-11-20 22:46:52 +02:00
unknown
14decc4fbc Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)


BitKeeper/etc/ignore:
  added mysql-test/r/*.warnings
BUILD/SETUP.sh:
  Don't build with BDB as default
client/client_priv.h:
  Added OPT_DEBUG_INFO
client/mysqlbinlog.cc:
  Fixed compiler warning
client/mysqldump.c:
  Removed compiler warnings
  Added option --debug-info to detect memory leaks
  Fixed memory leak
  Don't backup cluster replication tables (if used with 5.1)
cmd-line-utils/readline/bind.c:
  Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
  Fixed compiler warning
cmd-line-utils/readline/complete.c:
  Fixed compiler warning
cmd-line-utils/readline/display.c:
  Fixed compiler warning
cmd-line-utils/readline/histexpand.c:
  Fixed compiler warning
cmd-line-utils/readline/input.c:
  Fixed compiler warning
cmd-line-utils/readline/isearch.c:
  Fixed compiler warning
cmd-line-utils/readline/kill.c:
  Fixed compiler warning
cmd-line-utils/readline/macro.c:
  Fixed compiler warning
cmd-line-utils/readline/misc.c:
  Fixed compiler warning
cmd-line-utils/readline/nls.c:
  Fixed compiler warning
cmd-line-utils/readline/readline.c:
  Fixed compiler warning
cmd-line-utils/readline/rltty.c:
  Fixed compiler warning
cmd-line-utils/readline/search.c:
  Fixed compiler warning
cmd-line-utils/readline/terminal.c:
  Fixed compiler warning
cmd-line-utils/readline/text.c:
  Fixed compiler warning
cmd-line-utils/readline/tilde.c:
  Fixed compiler warning
cmd-line-utils/readline/undo.c:
  Fixed compiler warning
cmd-line-utils/readline/util.c:
  Fixed compiler warning
cmd-line-utils/readline/vi_mode.c:
  Fixed compiler warning
dbug/dbug_analyze.c:
  Fixed compiler warning
extra/yassl/src/ssl.cpp:
  Fixed compiler warning
extra/yassl/testsuite/testsuite.cpp:
  Fixed compiler warning
heap/_check.c:
  Fixed compiler warning
heap/hp_delete.c:
  Fixed compiler warning
heap/hp_hash.c:
  Fixed compiler warning
heap/hp_open.c:
  Fixed compiler warning
heap/hp_rkey.c:
  Fixed compiler warning
heap/hp_rrnd.c:
  Fixed compiler warning
heap/hp_write.c:
  Fixed compiler warning
libmysql/libmysql.c:
  Fixed compiler warning
libmysqld/libmysqld.c:
  Fixed compiler warning
myisam/mi_close.c:
  Fixed compiler warning
myisam/mi_delete.c:
  Fixed compiler warning
myisam/mi_dynrec.c:
  Fixed compiler warning
myisam/mi_keycache.c:
  Fixed compiler warning
myisam/mi_page.c:
  Fixed compiler warning
myisam/mi_statrec.c:
  Fixed compiler warning
myisam/mi_test2.c:
  Fixed compiler warning
myisam/mi_write.c:
  Fixed compiler warning
myisam/myisampack.c:
  Fixed compiler warning
myisammrg/myrg_extra.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  Remove .reject, .progress, .log and .warnings flag at start
  cluster -> mysql database (for 5.1)
mysql-test/include/federated.inc:
  Remove mysqltest warnings
mysql-test/include/sp-vars.inc:
  Remove mysqltest warnings
mysql-test/mysql-test-run.sh:
  Fix so that 'make test' works again
  Remove .reject, .progress .log and .warnings files at startup
mysql-test/r/ctype_cp1250_ch.result:
  Drop used tables at startup
mysql-test/t/create.test:
  Remove mysqltest warnings
mysql-test/t/csv.test:
  Remove mysqltest warnings
mysql-test/t/ctype_collate.test:
  Remove mysqltest warnings
mysql-test/t/ctype_cp1250_ch.test:
  Drop used tables at startup
mysql-test/t/ctype_ucs.test:
  Remove mysqltest warnings
mysql-test/t/func_sapdb.test:
  Remove mysqltest warnings
mysql-test/t/func_str.test:
  Remove mysqltest warnings
mysql-test/t/grant.test:
  Remove mysqltest warnings
mysql-test/t/greedy_optimizer.test:
  Remove mysqltest warnings
mysql-test/t/group_min_max.test:
  Remove mysqltest warnings
mysql-test/t/innodb.test:
  Remove mysqltest warnings
mysql-test/t/join.test:
  Remove mysqltest warnings
mysql-test/t/limit.test:
  Remove mysqltest warnings
mysql-test/t/null.test:
  Remove mysqltest warnings
mysql-test/t/select.test:
  Remove mysqltest warnings
mysql-test/t/sp-prelocking.test:
  Remove mysqltest warnings
mysql-test/t/strict.test:
  Remove mysqltest warnings
mysql-test/t/subselect.test:
  Remove mysqltest warnings
mysql-test/t/type_newdecimal.test:
  Remove mysqltest warnings
mysql-test/t/view_grant.test:
  Remove mysqltest warnings
mysys/default.c:
  Fixed compiler warning
mysys/hash.c:
  Fixed compiler warning
mysys/list.c:
  Fixed compiler warning
mysys/mf_iocache.c:
  Fixed compiler warning
mysys/mf_keycache.c:
  Fixed compiler warning
mysys/mf_keycaches.c:
  Fixed compiler warning
mysys/my_alloc.c:
  Fixed compiler warning
mysys/my_dup.c:
  Fixed compiler warning
mysys/my_fopen.c:
  Fixed compiler warning
mysys/my_fstream.c:
  Fixed compiler warning
mysys/my_getwd.c:
  Fixed compiler warning
mysys/my_handler.c:
  Fixed compiler warning
  Added missing enums in switch
mysys/my_lib.c:
  Fixed compiler warning
mysys/my_lread.c:
  Fixed compiler warning
mysys/my_lwrite.c:
  Fixed compiler warning
mysys/my_malloc.c:
  Fixed compiler warning
mysys/my_pread.c:
  Fixed compiler warning
mysys/my_read.c:
  Fixed compiler warning
mysys/my_realloc.c:
  Fixed compiler warning
mysys/my_seek.c:
  Fixed compiler warning
mysys/my_write.c:
  Fixed compiler warning
mysys/safemalloc.c:
  Fixed compiler warning
mysys/thr_lock.c:
  Fixed compiler warning
mysys/tree.c:
  Fixed compiler warning
mysys/typelib.c:
  Fixed compiler warning
ndb/include/logger/LogHandler.hpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/include/ndb_global.h.in:
  Added LINT_SET_PTR macro to be able to remove some compiler warnings
ndb/include/util/InputStream.hpp:
  Fixed compiler warning
ndb/include/util/OutputStream.hpp:
  Fixed compiler warning
ndb/include/util/SimpleProperties.hpp:
  Fixed compiler warning
ndb/src/common/debugger/EventLogger.cpp:
  remove if on 'signal' as this is a function pointer and is always true
ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Add missing enums
ndb/src/common/logger/LogHandler.cpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/src/common/portlib/NdbMutex.c:
  Fixed compiler warning
ndb/src/common/portlib/NdbThread.c:
  Fixed compiler warning
ndb/src/common/transporter/Transporter.cpp:
  Swapped arguments to remove compiler warnings
ndb/src/cw/cpcd/CPCD.hpp:
  Fixed compiler warning
ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Added missing enums
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.hpp:
  Fixed compiler warning
ndb/src/kernel/error/ndbd_exit_codes.c:
  Fixed compiler warning
ndb/src/kernel/vm/TransporterCallback.cpp:
  Fixed compiler warning
ndb/src/mgmapi/mgmapi.cpp:
  Fixed compiler warning
ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/Services.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ClusterMgr.cpp:
  Fixed compiler warning
ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndb.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationExec.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationSearch.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbTransaction.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbif.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbinit.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Fixed compiler warning
ndb/tools/drop_index.cpp:
  Fixed compiler warning
ndb/tools/drop_tab.cpp:
  Fixed compiler warning
ndb/tools/ndb_config.cpp:
  Fixed compiler warning
regex/regexec.c:
  Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
  Fixed compiler warning
sql/Makefile.am:
  Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse
sql/filesort.cc:
  Fixed compiler warning
sql/ha_archive.cc:
  Fixed compiler warning
sql/ha_federated.cc:
  Fixed compiler warning
sql/ha_federated.h:
  Fixed compiler warning
sql/ha_innodb.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/handler.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_subselect.cc:
  Fixed compiler warning
sql/item_timefunc.cc:
  Fixed compiler warning
sql/log_event.cc:
  Fixed compiler warning
sql/mysqld.cc:
  Fixed compiler warning
sql/net_serv.cc:
  Fixed compiler warning
sql/opt_range.cc:
  Fixed compiler warning
  Formated DBUG statements to be as rest of code
sql/slave.cc:
  Fixed compiler warning
sql/sql_acl.cc:
  Fixed compiler warning
sql/sql_cache.cc:
  Fixed compiler warning
  Fixed bug in query cache when used with DBUG traceing
sql/sql_class.cc:
  Fixed compiler warning
sql/sql_class.h:
  Fixed compiler warning
sql/sql_delete.cc:
  Fixed compiler warning
sql/sql_parse.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_prepare.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_repl.cc:
  Fixed compiler warning
sql/sql_select.cc:
  Fixed compiler warning
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_view.cc:
  Fixed compiler warning
sql/strfunc.cc:
  Fixed compiler warning
sql-common/client.c:
  Fixed compiler warning
sql-common/my_time.c:
  Fixed compiler warning
sql/table.cc:
  Fixed compiler warning
sql/tztime.cc:
  Fixed compiler warning
sql/unireg.cc:
  Fixed compiler warning
strings/decimal.c:
  Fixed compiler warning
tests/mysql_client_test.c:
  Fixed compiler warning
vio/viosocket.c:
  Fixed compiler warning
vio/viossl.c:
  Fixed compiler warning
vio/viosslfactories.c:
  Fixed compiler warning
2006-11-20 22:42:06 +02:00
unknown
3d3432bc6e Merge mysql.com:/usr/home/bar/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b23619


sql/log_event.cc:
  Auto merged
2006-11-16 12:28:09 +04:00
unknown
d149fc30d0 bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
ver 5.0 and 5.1 refinement.
adding to the MAX_SIZE_LOG_EVENT_STATUS estimation status vars and 
EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN


sql/log_event.cc:
  assertion on size of status vars
sql/log_event.h:
  MAX_SIZE_LOG_EVENT_STATUS as the max bytes of contribution of status vars into repl
  message; MAX_SIZE_LOG_EVENT_STATUS is getting more wrt to 4.1 version.
2006-11-14 12:48:17 +02:00
unknown
e0fc25e982 Bug#23619 Incorrectly escaped multibyte characters in binary log break replication
Problem: when embedding a character string with introducer with charset X
into a SQL query which is generally in character set Y, the string constants
were escaped according to their own character set (i.e.X), then after reading
such a "mixed" query from binlog, the string constants were unescaped
using character set of the query (i.e. Y), instead of X, which gave wrong
results or even syntax errors with tricky charsets (e.g. sjis)
Fix: when embedding a string constant of charset X into a query of charset Y,
the string constant is now escaped according to character Y, instead of
its own character set X.


mysql-test/r/ctype_cp932_binlog.result:
  Fixing test results.
sql/log_event.cc:
  Using character set "csinfo" instead of the string character set.
sql/sp_head.cc:
  - adding "thd" argument to sp_get_item_value()
    to have access to thd->variables.character_set_client
  - using character_set_client for escaping, instead of
    the string character set
mysql-test/r/rpl_charset_sjis.result:
  Adding test case
mysql-test/t/rpl_charset_sjis.test:
  Adding test case
2006-11-09 14:27:34 +04:00
unknown
be929087ec BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID
Non-upper-level INSERTs (the ones in the body of stored procedure,
stored function, or trigger) into a table that have AUTO_INCREMENT
column didn't affected the result of LAST_INSERT_ID() on this level.

The problem was introduced with the fix of bug 6880, which in turn was
introduced with the fix of bug 3117, where current insert_id value was
remembered on the first call to LAST_INSERT_ID() (bug 3117) and was
returned from that function until it was reset before the next
_upper-level_ statement (bug 6880).

The fix for bug#21726 brings back the behaviour of version 4.0, and
implements the following: remember insert_id value at the beginning
of the statement or expression (which at that point equals to
the first insert_id value generated by the previous statement), and
return that remembered value from LAST_INSERT_ID() or @@LAST_INSERT_ID.

Thus, the value returned by LAST_INSERT_ID() is not affected by values
generated by current statement, nor by LAST_INSERT_ID(expr) calls in
this statement.

Version 5.1 does not have this bug (it was fixed by WL 3146).


mysql-test/r/rpl_insert_id.result:
  Add results for bug#21726: Incorrect result with multiple invocations
  of LAST_INSERT_ID, and bug#20339: stored procedure using LAST_INSERT_ID()
  does not replicate statement-based.
mysql-test/t/rpl_insert_id.test:
  Add test cases for bug#21726: Incorrect result with multiple invocations
  of LAST_INSERT_ID, and bug#20339: stored procedure using LAST_INSERT_ID()
  does not replicate statement-based.
sql/item_func.cc:
  Add implementation of Item_func_last_insert_id::fix_fields(), where we
  remember in THD::current_insert_id the first value generated during
  execution of the previous statement, which is returned then from
  Item_func_last_insert_id::val_int().
sql/item_func.h:
  Add declaration of Item_func_last_insert_id::fix_fields().
sql/log_event.cc:
  Do not set THD::last_insert_id_used on LAST_INSERT_ID_EVENT.  Though we
  know the statement will call LAST_INSERT_ID(), it wasn't called yet.
sql/set_var.cc:
  In sys_var_last_insert_id::value_ptr() remember in
  THD::current_insert_id the first value generated during execution of the
  previous statement, and return this value for @@LAST_INSERT_ID.
sql/sql_class.cc:
  Reset THD::last_insert_id_used after each statement execution.
sql/sql_class.h:
  Rather then remember current insert_id value on first invocation of
  THD::insert_id(), remember it in Item_func_last_insert_id::fix_fields(),
  sys_var_last_insert_id::value_ptr(), or mysql_execute_command().
  Remove THD::insert_id(), as it lost its value now.
sql/sql_insert.cc:
  THD::insert_id() is removed, use THD::last_insert_id directly.
sql/sql_load.cc:
  THD::insert_id() is removed, using THD::last_insert_id directly is OK.
sql/sql_parse.cc:
  Remember in THD::current_insert_id first generated insert id value of
  the previous statement in mysql_execute_command().
  No need to reset THD::last_insert_id_used in
  mysql_reset_thd_for_next_command(), it will be reset after each
  statement.
sql/sql_select.cc:
  If "IS NULL" is replaced with "= <LAST_INSERT_ID>", use right value,
  which is THD::current_insert_id, and also set THD::last_insert_id_used
  to issue binary log LAST_INSERT_ID_EVENT.
sql/sql_update.cc:
  THD::insert_id() is removed, use THD::last_insert_id directly.
tests/mysql_client_test.c:
  Add test case for bug#21726: Incorrect result with multiple invocations
  of LAST_INSERT_ID.
2006-10-02 14:28:23 +04:00
unknown
12bc3c370b Fixed the faulty merge 2006-09-13 19:32:21 +04:00
unknown
b419501e0d Merge polly.local:/tmp/20924/bug20294/my41-bug20294
into  polly.local:/tmp/20924/bug20294/my50-bug20294


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/case.result:
  Manual merge
mysql-test/r/func_if.result:
  Manual merge
mysql-test/r/func_test.result:
  Manual merge
mysql-test/r/user_var.result:
  Manual merge
mysql-test/t/case.test:
  Manual merge
mysql-test/t/func_if.test:
  Manual merge
mysql-test/t/func_test.test:
  Manual merge
mysql-test/t/user_var.test:
  Manual merge
sql/item_func.cc:
  Manual merge
2006-09-13 15:18:14 +04:00
unknown
418ae41b48 Cset exclude: kaa@polly.local|ChangeSet|20060912122540|09861
Cset exclude: kaa@polly.local|ChangeSet|20060908100829|09983


sql/item_cmpfunc.cc:
  Exclude
sql/item_cmpfunc.h:
  Exclude
sql/item_func.cc:
  Exclude
sql/item_func.h:
  Exclude
sql/log_event.cc:
  Exclude
sql/sql_class.h:
  Exclude
mysql-test/r/case.result:
  Exclude
mysql-test/r/func_if.result:
  Exclude
mysql-test/r/func_test.result:
  Exclude
mysql-test/r/user_var.result:
  Exclude
mysql-test/t/case.test:
  Exclude
mysql-test/t/func_if.test:
  Exclude
mysql-test/t/func_test.test:
  Exclude
mysql-test/t/user_var.test:
  Exclude
2006-09-13 14:41:28 +04:00
unknown
db141b6b45 Merge polly.local:/tmp/20924/bug20294/my41-bug20294
into  polly.local:/tmp/20924/bug20294/my50-bug20294


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/case.result:
  Manual merge
mysql-test/r/func_if.result:
  Manual merge
mysql-test/r/func_test.result:
  Manual merge
mysql-test/r/user_var.result:
  Manual merge
mysql-test/t/case.test:
  Manual merge
mysql-test/t/func_if.test:
  Manual merge
mysql-test/t/func_test.test:
  Manual merge
mysql-test/t/user_var.test:
  Manual merge
sql/item_func.cc:
  Manual merge
2006-09-12 17:57:15 +04:00
unknown
5aa6e8615e Post-review fixes for bug #20924
mysql-test/r/case.result:
  Post-review fix for bug #20924
mysql-test/r/func_if.result:
  Post-review fix for bug #20924
mysql-test/r/func_test.result:
  Post-review fix for bug #20924
mysql-test/r/user_var.result:
  Post-review fix for bug #20924
mysql-test/t/case.test:
  Post-review fix for bug #20924
mysql-test/t/func_if.test:
  Post-review fix for bug #20924
mysql-test/t/func_test.test:
  Post-review fix for bug #20924
mysql-test/t/user_var.test:
  Post-review fix for bug #20924
sql/item_func.cc:
  Post-review fix for bug #20924
sql/item_func.h:
  Post-review fix for bug #20924
sql/log_event.cc:
  Post-review fix for bug #20924
2006-09-12 16:25:40 +04:00
unknown
88843709d8 A fix for Bug#19022 "Memory bug when switching db during trigger execution".
No test case as the bug is in an existing test case (rpl_trigger.test
when it is run under valgrind).
The warning was caused by memory corruption in replication slave: thd->db
was pointing at a stack address that was previously used by 
sp_head::execute()::old_db. This happened because mysql_change_db
behaved differently in replication slave and did not make a copy of the 
argument to assign to thd->db. 
The solution is to always free the old value of thd->db and allocate a new
copy, regardless whether we're running in a replication slave or not.


sql/log_event.cc:
  Move rewrite_db to log_event.cc, the only place where it is used.
sql/slave.cc:
  Move rewrite_db to log_event.cc
sql/slave.h:
  Remove an unneeded declaration.
sql/sql_class.h:
  Fix set_db to always free the old db, even if the argument is NULL.
  Add a comment.
sql/sql_db.cc:
  Always make a deep copy of the argument in mysql_change_db, even 
  if running in a replication slave. This is necessary because 
  sp_use_new_db (stored procedures) assumes that mysql_change_db always makes
  a deep copy of the argument, and thus passes a pointer to stack into it.
  This assumption was true for all cases except the replication slave thread.
2006-06-28 23:47:45 +04:00
unknown
e3ef15ea37 Fix compilation failures on Windows caused by the patch for Bug#17199.
Fix a minor issue with Bug#16206 (bdb.test failed if the tree is compiled 
without blackhole).


include/my_sys.h:
  Change declaration of my_strdup_with_length to accept const char *,
  not const byte *: in 5 places out of 6 where this function is used,
  it's being passed char *, not byte *
mysql-test/r/bdb.result:
  Remove dependency on an optional engine (updated test results).
mysql-test/t/bdb.test:
  Remove dependency on an optional engine.
mysys/my_malloc.c:
  my_strdup_with_length: const byte * -> const char *
mysys/safemalloc.c:
  my_strdup_with_length: const byte * -> const char *
sql/ha_federated.cc:
  my_strdup_with_length: const byte * -> const char *
sql/log_event.cc:
  my_strdup_with_length: const byte * -> const char *
sql/set_var.cc:
  my_strdup_with_length: const byte * -> const char *
sql/sql_class.h:
  Change db_length type to uint from uint32 (see also table.h)
sql/table.h:
  Change the type of db_length to uint from uint32: LEX_STRING uses uint for 
  length, we need a small and consistent set of types to store length to 
  minimize cast and compile failures.
2006-06-27 14:56:24 +04:00
unknown
cf119987f1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/opt/local/work/mysql-5.0-17199


mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  SCCS merged
mysql-test/t/sp.test:
  SCCS merged
2006-06-27 00:52:56 +04:00
unknown
d6bcbfbe92 A fix and a test case for
Bug#19022 "Memory bug when switching db during trigger execution"
 Bug#17199 "Problem when view calls function from another database."
 Bug#18444 "Fully qualified stored function names don't work correctly in
            SELECT statements"

 Documentation note: this patch introduces a change in behaviour of prepared
 statements.

 This patch adds a few new invariants with regard to how THD::db should
 be used. These invariants should be preserved in future:

  - one should never refer to THD::db by pointer and always make a deep copy
    (strmake, strdup)
  - one should never compare two databases by pointer, but use strncmp or
    my_strncasecmp
  - TABLE_LIST object table->db should be always initialized in the parser or
    by creator of the object.

    For prepared statements it means that if the current database is changed
    after a statement is prepared, the database that was current at prepare
    remains active. This also means that you can not prepare a statement that
    implicitly refers to the current database if the latter is not set.
    This is not documented, and therefore needs documentation. This is NOT a
    change in behavior for almost all SQL statements except:
     - ALTER TABLE t1 RENAME t2 
     - OPTIMIZE TABLE t1
     - ANALYZE TABLE t1
     - TRUNCATE TABLE t1 --
     until this patch t1 or t2 could be evaluated at the first execution of
     prepared statement. 

     CURRENT_DATABASE() still works OK and is evaluated at every execution
     of prepared statement.

     Note, that in stored routines this is not an issue as the default
     database is the database of the stored procedure and "use" statement
     is prohibited in stored routines.

  This patch makes obsolete the use of check_db_used (it was never used in the
  old code too) and all other places that check for table->db and assign it
  from THD::db if it's NULL, except the parser.

 How this patch was created: THD::{db,db_length} were replaced with a
 LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were
 manually checked and:
  - if the place uses thd->db by pointer, it was fixed to make a deep copy
  - if a place compared two db pointers, it was fixed to compare them by value
    (via strcmp/my_strcasecmp, whatever was approproate)
 Then this intermediate patch was used to write a smaller patch that does the
 same thing but without a rename.

 TODO in 5.1:
   - remove check_db_used
   - deploy THD::set_db in mysql_change_db

 See also comments to individual files.


mysql-test/r/create.result:
  Modify the result file: a database can never be NULL.
mysql-test/r/ps.result:
  Update test results (Bug#17199 et al)
mysql-test/r/sp.result:
  Update test results (Bug#17199 et al)
mysql-test/t/create.test:
  Update the id of the returned error.
mysql-test/t/ps.test:
  Add test coverage for prepared statements and current database. In scope of
  work on Bug#17199 "Problem when view calls function from another database."
mysql-test/t/sp.test:
  Add a test case for Bug#17199 "Problem when view calls function from another
  database." and Bug#18444 "Fully qualified stored function names don't work
  correctly in SELECT statements". Test a complementary problem.
sql/item_strfunc.cc:
  Touch the code that reads thd->db (cleanup).
sql/log_event.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.h:
  Remove a declaration for a method that is used only in one module.
sql/sp.cc:
  Rewrite sp_use_new_db: this is a cleanup that I needed in order to understand
  this function and ensure that it has no bugs.
sql/sp.h:
  Add a new declaration for sp_use_new_db (uses LEX_STRINGs) and a comment.
sql/sp_head.cc:
  - drop sp_name_current_db_new - a creator of sp_name class that was used
  when sp_name was created for an identifier without an explicitly initialized
  database. Now we pass thd->db to constructor of sp_name right in the 
  parser.
  - rewrite sp_head::init_strings: name->m_db is always set now
  - use the new variant of sp_use_new_db
  - we don't need to update thd->db with SP MEM_ROOT pointer anymore when
  parsing a stored procedure, as noone will refer to it (yes!)
sql/sp_head.h:
  - remove unneded methods and members
sql/sql_class.h:
  - introduce 3 THD  methods to work with THD::db:
    .set_db to assign the current database
    .reset_db to reset the current database (temporarily) or set it to NULL
    .opt_copy_db_to - to deep-copy thd->db to a pointer if it's not NULL
sql/sql_db.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_insert.cc:
  - replace checks with asserts: table_list->db must be always set in the parser.
sql/sql_lex.h:
  - add a comment
sql/sql_parse.cc:
  - implement the invariant described in the changeset comment.
  - remove juggling with lex->sphead in SQLCOM_CREATE_PROCEDURE:
    now db_load_routine uses its own LEX object and doesn't damage the main
    LEX.
  - add DBUG_ASSERT(0) to unused "check_db_used"
sql/sql_table.cc:
  - replace a check with an assert (table_ident->db)
sql/sql_trigger.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_udf.cc:
  - use thd->set_db instead of direct modification of to thd->db
sql/sql_view.cc:
  - replace a check with an assert (view->db)
sql/sql_yacc.yy:
  - make sure that we always copy table->db or name->db or ident->db or
    select_lex->db from thd->db if the former is not set. If thd->db
    is not set but is accessed, return an error.
sql/tztime.cc:
  - be nice, never copy thd->db by pointer.
2006-06-27 00:47:52 +04:00
unknown
1c1570940f Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit
mode

This is a modification of serg's and guilhem's suggestion in the bug report,
in that it also causes the transaction log to be written to disc.


mysql-test/r/bdb.result:
  Add result.
mysql-test/t/bdb.test:
  Add test
sql/log.cc:
  Create a log-committing event that itself won't be written to the log when 
  we're in autocommit mode.
sql/log_event.cc:
  Add a new subclass of Query_log_event that doesn't write itself to the log, for
  cases where we only want to flush out the transaction and not also write about
  this event.
sql/log_event.h:
  Add a new subclass of Query_log_event that doesn't write itself to the log, for
  cases where we only want to flush out the transaction and not also write about
  this event.
2006-06-12 08:54:45 -04:00
unknown
83ba974a3d BUG#18293 (Values in stored procedures written to binlog unescaped):
Generating character set-independent quoting of strings for the
binary log when executing statements from inside stored procedure.


mysql-test/r/ctype_cp932_binlog.result:
  Result change
mysql-test/t/ctype_cp932_binlog.test:
  Adding check that string literals are written correctly for multi-byte
  character sets.
sql/item.cc:
  Cutting out character set-independent string escaping code and putting it
  in a separate function.
sql/log_event.cc:
  Adding characters set-independent code to separate function.
sql/mysql_priv.h:
  Adding new function.
sql/sp_head.cc:
  Escaping string value representing a string item.
2006-03-21 14:35:49 +01:00
unknown
a68f171585 BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1.


client/mysql.cc:
  BUG#16217 forced to introduce a separate mysql client command.
  Feature is backported from 5.0, precisely 
  ChangeSet 1.2034 06/02/09 16:23:09 aelkin@mysql.com
  (under second review at the moment)
mysql-test/r/mysqlbinlog.result:
  changed in 5.0
mysql-test/t/mysqlbinlog.test:
  backported from 5.0. The last part of the test to mimic bug#16217
sql/log_event.cc:
  Inserting exclaiming comment command for mysql client made differently than in 5.0.
  Parsing still is cheap enough not to think to modify server code instead.
2006-02-10 15:12:27 +02:00
unknown
e025e47a76 BUG#16217 forced to introduce a separate mysql client command to adopt its
internal charset to one associated with currently being handled query. 
To note such a query can come from interactive client either.

There was a discussion within replication team and Monty who's suggestion won.
It avoids straightforward parsing of all `set' queries that could affect client side 
character set. 
According to the idea, mysql client does not parse `set' queries but rather cares of
`charset new_cs_name' command.
This command is generated by mysqlbinlog in form of exclaiming comment (Lars' suggestion)
so that enlightened clients like `mysql' knows what to do with it.

Interactive human can switch between many multi-byte charsets during the session 
providing the command explicitly. 
To note that setting new internal mysql's charset does not
trigger sending any `SET' sql statement to the server. 


client/mysql.cc:
  BUG#16217 revealed the problem of switching between charsets in mysql client.
  Such switching is necessary in a case when being scanned query consists of 
  multi-byte chars and internal charset was initialized differently. mysql finds 
  `/' escape and misiterprete it 
  while in fact one could be a part of a multi-byte symbol like the bug page reported. 
  
  This patch extends mysql `charset' command, '\C' shortcut.
mysql-test/r/ctype_ucs_binlog.result:
  comment line generated by mysqlbinlog for processing of logs with multi-byte chars.
mysql-test/r/mysql.result:
  results are altered due to #16217
mysql-test/r/mysqlbinlog.result:
  Results are altered due to #16217
mysql-test/r/mysqlbinlog2.result:
  commeted command for mysql client due to multi-byte binlog
mysql-test/r/rpl_charset.result:
  commented command for mysql due to multi-byte binlogs
mysql-test/r/rpl_timezone.result:
  commented command for mysql client due to multi-byte binlogs
mysql-test/r/user_var-binlog.result:
  commented command for mysql client due to multi-byte binlogs
mysql-test/t/mysql.test:
  Main test for mysql client is extended to check `charset' command.
mysql-test/t/mysqlbinlog.test:
  Checking how /*! \C cs_name */ are added to the output of mysqlbinlog.
  The exclaiming comment is for further processing by mysql client.
  The added part mimics the failure to recover tables from binlog - see BUG#16217.
sql/log_event.cc:
  Sending into output instructions for mysql client to switch internally 
  to appropriate charset.
  mysql client is supposed to be invoked with --default-character-set=
  "to default character set of the server created the binlog".
2006-02-09 16:23:09 +02:00
unknown
e931d813e1 merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_handler.cc:
  ur
2006-01-06 18:26:59 +01:00
unknown
64206b1850 Review fixes of new pushed code
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
  - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
  - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null


mysql-test/r/create.result:
  Update results after removing wrong warnings for CREATE ... SELECT
  New tests
mysql-test/r/handler.result:
  Drop used tables
mysql-test/r/kill.result:
  Make test portable
mysql-test/r/mysqlshow.result:
  Drop tables used by previous test
mysql-test/r/trigger.result:
  Reuse old procedure name
mysql-test/r/view.result:
  Extra tests
mysql-test/t/create.test:
  New tests to test fix of removing wrong warnings for CREATE ... SELECT
mysql-test/t/disabled.def:
  Enable 'kill' test (should now be portable)
mysql-test/t/handler.test:
  Drop used tables
mysql-test/t/kill.test:
  Make test portable even if kill doesn't work at once
mysql-test/t/mysqlshow.test:
  Drop tables used by previous test
mysql-test/t/trigger.test:
  Reuse old procedure name
mysql-test/t/view.test:
  Extra tests
sql/field.cc:
  Removed compiler warning
sql/ha_federated.cc:
  my_snprintf -> strmake()
  (Simple optimization)
sql/ha_ndbcluster.cc:
  Indentation cleanups and trival optimization
sql/item.cc:
  Moved save_org_in_field() to item.cc to make it easier to test
  Remove setting of null_value as this is not needed
sql/item.h:
  Moved save_org_in_field() to item.cc to make it easier to test
sql/log_event.cc:
  Remove inline of slave_load_file_stem()
  Added 'extension' parameter to slave_load_file_stem() to get smaller code
  Removed not critical (or needed) DBUG_ASSERT()'s
  Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths
  Indentation fixes
sql/opt_range.cc:
  Moved code from declaration to function body
  (To make it more readable)
sql/parse_file.cc:
  Fixed DBUG_PRINT
sql/sp.cc:
  Simple cleanups
  - Removed not needed {} level
  - Ensure saved variables starts with old_
sql/sp_head.cc:
  Indentation fixes
  Remove core dump when using --debug when m_next_cached_sp == 0
  Fixed compiler warnings
  Trivial optimizations
sql/sp_head.h:
  Changed argument to set_definer() to const
  Added THD argument to recursion_level_error() to avoid call to current_thd
sql/sql_acl.cc:
  Removed not needed test (first_not_own_table is the guard)
sql/sql_base.cc:
  Removed extra empty line
sql/sql_handler.cc:
  Don't test table version in mysql_ha_read() as this is already tested in lock_tables()
  Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables
  (Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash)
sql/sql_insert.cc:
  Mark fields that are set in CREATE ... SELECT as used
  (Removed wrong warnings about field not having a default value)
sql/sql_parse.cc:
  Removed not needed test of 'tables' (first_not_own_table is the guard)
  Simplify code
sql/sql_select.cc:
  Use group->field to check if value is null instead of item called by 'save_org_in_field'
  This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null)
sql/sql_trigger.cc:
  Move sql_modes_parameters outside of function
  Indentation fixes
  Fixed compiler warning
  Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access()
  (This allows us to remove the extra test in check_grant() and check_table_access())
2006-01-06 00:47:49 +02:00
unknown
307c0b77a1 many warnings (practically safe but annoying) corrected
client/mysqladmin.cc:
  don't use the handler after it's closed
client/mysqlbinlog.cc:
  memory leak
client/mysqldump.c:
  many "ignore return value" warnings, one "NULL dereference"
cmd-line-utils/libedit/history.c:
  memory leak
include/my_base.h:
  cleanup
libmysql/libmysql.c:
  "return value ignored" warning
myisam/mi_delete.c:
  "return value ignored" warning
myisam/myisampack.c:
  "out-of-bound access" warning
myisam/sort.c:
  "double free" warning
mysys/default_modify.c:
  "double free" warning
mysys/mf_iocache2.c:
  "return value ignored" warnings
mysys/my_bitmap.c:
  s/return/DBUG_RETURN/
mysys/my_error.c:
  memory leak
server-tools/instance-manager/parse.cc:
  "NULL dereference" warning
sql-common/client.c:
  "NULL dereference" warning
sql/field.cc:
  deadcode, "NULL dereference", "uninitialized" warnings
sql/field.h:
  unused parameters removed from constructor
sql/ha_myisam.cc:
  "return value ignored" warnings
sql/item.cc:
  "return value ignored" warnings
  changed constructor
sql/item_func.cc:
  "return value ignored" warnings
sql/log_event.cc:
  uninitialized warning
sql/opt_range.cc:
  "double free" and uninitialized warnings
sql/opt_range.h:
  "return value ignored" warning
sql/repl_failsafe.cc:
  "return value ignored" warning
sql/set_var.cc:
  "return value ignored" warning
sql/slave.cc:
  "return value ignored" warnings
sql/slave.h:
  new prototype
sql/sql_acl.cc:
  deadcode and "NULL dereference" warnings
sql/sql_db.cc:
  "return value ignored" warning
sql/sql_handler.cc:
  "NULL dereference" warning
sql/sql_help.cc:
  "NULL dereference" warning
sql/sql_insert.cc:
  "return value ignored" warning
sql/sql_parse.cc:
  "return value ignored" warning
  one more DBUG_ASSERT
sql/sql_repl.cc:
  "return value ignored" and memory leak warnings
sql/sql_show.cc:
  "return value ignored" and "NULL dereference"  warnings
sql/sql_test.cc:
  "return value ignored" warning
sql/table.cc:
  memory leak
sql/uniques.cc:
  "return value ignored" warning
  endspaces deleted
2006-01-03 17:54:54 +01:00
unknown
baff781ba4 Minor Win32 compile fixes for 4.1.16 release.
sql/log_event.cc:
  Add missing cast needed for Win32 compilation.
include/config-win.h:
  Win32 compile fix: quote multi-line macros with do { ... } while(0) to follow earlier changes in my_global.h.
2005-11-28 15:07:20 +01:00
unknown
929e6e05be Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into  mysql.com:/users/lthalmann/bk/mysql-5.0-hexdump


sql/log_event.cc:
  Auto merged
2005-11-22 11:34:55 +01:00
unknown
0191f2b95d Added explicit casts, since on i686, the fprintf function does not cast my_off_t correctly.
Changed wrong printf to fprintf.


sql/log_event.cc:
  Added explicit casts, changed wrong printf to fprintf
2005-11-22 02:40:08 +01:00
unknown
fe63e09581 Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.


sql/field.cc:
  Inefficient usage of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
  A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
  Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
  Bad examples of usage of a string with its length fixed.
sql/handler.cc:
  Inefficient usage of String::append() fixed.
sql/item.cc:
  Bad examples of usage of a string with its length fixed.
sql/item.h:
  A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
  Inefficient using of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
  Bad examples of usage of a string with its length fixed.
sql/key.cc:
  Bad examples of usage of a string with its length fixed.
sql/log.cc:
  Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
  Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
  The dummy parser hook allocated.
sql/opt_range.cc:
  Inefficient usage of String::append() fixed.
sql/parse_file.cc:
  Bad examples of usage of a string with its length fixed.
  A hook for unknown keys added to the parser.
sql/parse_file.h:
  A hook for unknown keys added to the parser.
sql/protocol.cc:
  A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
  Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
  A warning for old format config file.
sql/slave.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
  Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
  The macro definition moved to sql_string.h to
    be accessible in all parts of server.
sql/sql_table.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
  Bad examples of usage of a string with its length fixed.
  The incorrect length in the trigger file configuration descriptor
    fixed (BUG#14090).
  The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
  A dummy  hook used for parsing views.
sql/structs.h:
  The macro definition moved to sql_string.h to be
    accessible in all parts of server.
sql/table.cc:
  A bad example of usage of a string with its length fixed.
sql/tztime.cc:
  A bad example of usage of a string with its length fixed.
2005-11-20 20:47:07 +02:00
unknown
e5eab7dd97 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into  mysql.com:/users/lthalmann/bk/mysql-5.0-hexdump


client/mysqlbinlog.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
2005-10-19 19:42:14 +02:00
unknown
e040920f95 mysqlbinlog --hexdump patch 4:
Rename last_event_info to print_event_info to better reflect the new semantics


client/mysqlbinlog.cc:
  Rename last_event_info to print_event_info
sql/log_event.cc:
  Rename last_event_info to print_event_info
sql/log_event.h:
  Rename last_event_info to print_event_info
2005-10-19 19:31:24 +02:00
unknown
91afe31fe0 Fixed compile errors on windows
VC++Files/test1/mysql_thr.c:
  Fixed typo
VC++Files/thr_test/thr_test.c:
  Fixed typo
sql/log_event.cc:
  Removed compiler warning
  Fixed compile error on windows
2005-10-14 11:44:46 +03:00
unknown
16f3cb0394 fixes after merge of 4.1.
mysql-test/r/subselect.result:
  correcting non-ascii chars hosed by automerge as usual
mysql-test/t/subselect.test:
  correcting non-ascii chars hosed by automerge as usual
sql/log_event.cc:
  correcting bad manual merge. ZERO_LEN is not needed in 5.0, as ::exec_event() just tell()s the relay log instead
  of using get_event_len().
sql/log_event.h:
  get_event_len() is not needed in 5.0, ZERO_LEN neither.
sql/slave.cc:
  fixes to take into account 5.0 specificities in replication. ZERO_LEN is not needed.
2005-10-13 00:29:23 +02:00
unknown
92291753ab Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into  mysql.com:/users/lthalmann/bk/mysql-5.0-hexdump


sql/log_event.cc:
  Auto merged
2005-10-12 23:40:54 +02:00
unknown
4184dc214c mysqlbin --hexdump patch 3
client/mysqlbinlog.cc:
  Collapsing multiple arguments to print function into the last_event_info struct
sql/log_event.cc:
  Only print header is length=19 (otherwise print in standard hexdump format)
  Collapsing multiple arguments into last_event_info struct
sql/log_event.h:
  Collapsing multiple arguments into last_event_info struct
2005-10-12 23:37:21 +02:00
unknown
8b1a32aead Merge mysql.com:/home/mysql_src/mysql-4.1
into  mysql.com:/home/mysql_src/mysql-5.0;
a very bad automerge (issues with non-ascii chars), plus some hard conflicts I'll fix by hand in a next cset


BitKeeper/deleted/.del-compile-pentium64-valgrind-max:
  Delete: BUILD/compile-pentium64-valgrind-max
BitKeeper/etc/config:
  Auto merged
sql/log.cc:
  Auto merged
sql/slave.h:
  Auto merged
client/mysqltest.c:
  manual merge
mysql-test/r/subselect.result:
  manual merge
mysql-test/t/subselect.test:
  manual merge
sql/log_event.cc:
  manual merge
sql/log_event.h:
  manual merge
sql/slave.cc:
  manual merge
sql/sql_yacc.yy:
  manual merge
2005-10-12 21:58:02 +02:00
unknown
7ff27a614d Fix for BUG#13023: "SQL Thread is up but doesn't move forward". Details in slave.cc;
in short we now record whenever the slave I/O thread ignores a master's event because of its server id,
and use this info in the slave SQL thread to advance Exec_master_log_pos. Because if we
do not, this variable stays at the position of the last executed event, i.e. the last *non-ignored*
executed one, which may not be the last of the master's binlog (and so the slave *looks* behind
the master though it's data-wise it's not).


mysql-test/t/rpl_dual_pos_advance-master.opt:
  empty; its goal is just to trigger a server restart after running the test,
  so that the master forgets that it was a slave (otherwise it affects the following tests).
sql/log.cc:
  No more default arguments for Rotate_log_event constructor.
  MYSQL_LOG::appendv() is now called without mutex.
sql/log_event.cc:
  Moving one Rotate_log_event constructor from log_event.h. Support for on-demand choice of
  duplicating the string argument of the constructor or not (because there now are needs for both
  alternatives, see slave.cc).
sql/log_event.h:
  We now have a case where a Rotate_log_event is executed by the slave SQL thread while
  not being in the relay log, so it needs to pretend its length is 0: a ZERO_LEN flag for that;
  a flag DUP_NAME (replaces "bool alloced") to be able to choose if we want the constructor
  to duplicate the string argument or not.
sql/slave.cc:
  A comment for BUG#13861 (to be fixed). llstr() instead of %ld as the number is ulonglong.
  mi->rli becomes rli in some places.
  Fix for BUG#13023:
  - in the slave I/O thread, whenever we ignore an event because of its server id we update
  a couple of coordinates in memory
  - in the slave SQL thread, whenever we bump into the end of the latest relay log, we check
  this couple of coordinates to see if we should advance our Exec_master_log_pos.
  - when the slave I/O thread terminates it saves these in-memory coordinates into a Rotate event
  in the relay log, so that they are durable.
sql/slave.h:
  A couple of coordinates in RELAY_LOG_INFO to keep track of the last ignored events received
  by the slave I/O thread (ignored because of the server id).
mysql-test/r/rpl_dual_pos_advance.result:
  New BitKeeper file ``mysql-test/r/rpl_dual_pos_advance.result''
mysql-test/t/rpl_dual_pos_advance.test:
  Test for BUG#13023 (with a part, disabled, to test BUG#13861 when I fix it).
  Before the fix, this test used to hang.
2005-10-12 13:29:55 +02:00
unknown
0ce12f70ed Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code


client/mysqldump.c:
  Simple optimizations of new code
  Indentation fixes
client/mysqltest.c:
  Removed not needed variable
include/mysql_com.h:
  Made octec2hex() more usable
mysql-test/r/ctype_utf8.result:
  CHAR() now returns binary string as default
mysql-test/r/func_str.result:
  CHAR() now returns binary string as default
mysql-test/r/range.result:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/r/user_var-binlog.result:
  CHAR() now returns binary string as default
mysql-test/r/view.result:
  More tests of view rename
mysql-test/t/ctype_utf8.test:
  CHAR() now returns binary string as default
mysql-test/t/func_str.test:
  CHAR() now returns binary string as default
mysql-test/t/range.test:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/t/view.test:
  More tests of view rename
mysys/mf_keycache.c:
  Indentation changes
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/my_os2cond.c:
  Fix to MySQL coding style
  Optimized functions
mysys/thr_lock.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/thr_mutex.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/instance.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/thread_registry.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/ha_federated.cc:
  Use octet2hex()
sql/ha_ndbcluster.cc:
  Removed not used variable
sql/handler.cc:
  Simplify code
  Use *NONE* instead of 'none' for not existing storage engine
  Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
sql/item.h:
  Remove not needed test for *ref.  (If ref is set, it should never point at 0)
sql/item_func.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  Simplify code
  More comments
  Require that last argument to find_and_check_access() is given
  (Made code shorter and faster)
sql/item_strfunc.cc:
  Changed CHAR() to return result in binary collation
  CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
  
  Bar will shortly add the following syntax:
  CHAR(.... USING character_set)
  and ensure that
  CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings
  Use ocet2hex()
sql/item_strfunc.h:
  CHAR() now returns a binary string
sql/log_event.cc:
  Use octet2hex()
  Simplify code
sql/parse_file.cc:
  Indentation fixes
  Use for() instead of while()
sql/password.c:
  Make octet2hex() more generally usable by returning pointer to end 0
sql/slave.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_base.cc:
  Indentation fixes
sql/sql_insert.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_manager.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_parse.cc:
  Don't check thd->db when checking for function privileges
sql/sql_prepare.cc:
  Fixed wrong merge
sql/sql_select.cc:
  Fixed new bug for NOT BETWEEN X and X
sql/sql_show.cc:
  Removed not used variable
sql/sql_table.cc:
  Indentation fixed
  Removed DBUG_PRINT that is obvious from context
sql/sql_view.cc:
  Simplify code
sql/unireg.cc:
  Use octet2hex()
2005-10-12 00:58:22 +03:00
unknown
c807724f36 Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code



BUILD/FINISH.sh:
  Ensure that ccache is also used for C programs
BUILD/SETUP.sh:
  Ensure that ccache is also used for C programs
client/mysql.cc:
  More debugging
  Ensure that 'delimiter' works the same way in batch mode as in normal mode.
  Compare 'delimiter' command case-insensitive.
  The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump.
client/mysqldump.c:
  Indentation fixes
  Use ;; as a delmimiter for stored procedures and triggers instead of //
client/mysqltest.c:
  Indentation fixes
include/my_sys.h:
  Remove not needed MY_UNIX_PATH parameter
mysql-test/r/alter_table.result:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/r/func_str.result:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/r/information_schema.result:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/r/information_schema_inno.result:
  Drop all used tables
mysql-test/r/multi_statement.result:
  Drop used tables
mysql-test/r/mysql.result:
  Add error messages to result
mysql-test/r/mysqldump.result:
  ;; is now used as SP/trigger delimiter
mysql-test/r/mysqlshow.result:
  Drop used tables
mysql-test/r/temp_table.result:
  Drop used views
  Rename views to v#
mysql-test/t/alter_table.test:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/t/func_str.test:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/t/information_schema.test:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/t/information_schema_inno.test:
  Drop all used tables
mysql-test/t/multi_statement.test:
  Drop used tables
mysql-test/t/mysql.test:
  Add error messages to result
mysql-test/t/mysqlshow.test:
  Drop used tables
mysql-test/t/temp_table.test:
  Drop used views
  Rename views to v#
mysys/mf_format.c:
  Remove not needed MY_UNIX_PATH parameter
  (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH)
sql/ha_federated.cc:
  Removed extra empty line
sql/item.cc:
  Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal
  Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable
  One doesn't have to set 'null_value' when calling 'is_null()'
sql/item.h:
  Add THD as a class variable to Item_splocal
  Use 'str_value' instead of 'str_value_ptr' to hold temp result
  Fixed bug in Item_hex when used in CAST()
sql/item_func.cc:
  Optimize new code
sql/log_event.cc:
  Move 'to_unix_path()' out of fn_format()
sql/opt_range.cc:
  Simplify code
sql/sp_head.cc:
  Ensure that Item_splocal has thd set before we call '->this_item()'
sql/sql_class.cc:
  Return error if Statement::insert() fails in either hash_insert()
sql/sql_parse.cc:
  Remove 'current_db_used' as we can trivially check if db table qualifier was used without this.
  Simplify code
sql/sql_prepare.cc:
  Use enum instead of const int, to avoid ugly code for VC++
sql/structs.h:
  Remove compiler warnings when using STRING_WITH_LEN() with constant strings.
sql/table.cc:
  Fixed indentation
sql/table.h:
  Remove not needed current_db_used
strings/decimal.c:
  Simplify code
strings/longlong2str-x86.s:
  A bit faster longlong2str.
  (Took some ideas from Peter Gulutzan's code)
strings/my_strtoll10.c:
  Simplify code for MetroWerks compiler
2005-10-06 17:54:43 +03:00
unknown
374deedd85 mysqlbinlog --hexdump additional patch 2
- Fixes related to Guilhems review
- Special printing of event header


client/mysqlbinlog.cc:
  Fixes of option --hexdump handling
sql/log_event.cc:
  Fixes related to Guilhems review
  Special printing of event header
sql/log_event.h:
  Fixes related to Guilhems review
2005-09-30 00:12:14 +02:00
unknown
b2f976f2c8 mysqlbinlog --hexdump augments each log entry with byte information 2005-09-29 10:42:23 +02:00
unknown
a03acb3cb5 Merge mysql.com:/users/lthalmann/bk/mysql-4.1
into  mysql.com:/users/lthalmann/bk/mysql-5.0


mysql-test/t/rpl_replicate_do.test:
  Auto merged
scripts/Makefile.am:
  Auto merged
Makefile.am:
  Manual merge
mysql-test/r/rpl_replicate_do.result:
  Manual merge
sql/log_event.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
2005-09-02 11:01:00 +02:00
unknown
f8aadb6094 BUG#12542: Added comments
sql/log_event.cc:
  Added comments
sql/sql_parse.cc:
  Added comments
2005-09-01 17:58:00 +02:00
unknown
bffb5d0048 Fixes bug #11815. Convert file path to UNIX format to build correct query
string while replicating LOAD DATA INFILE statement.


VC++Files/mysys/mysys.dsp:
  added mf_unixpath.c into mysys.dsp
include/my_sys.h:
  Added an option for fn_format function to convert path from system representation
  to UNIX format.
mysys/mf_format.c:
  Added an option for fn_format function to convert path from system
  representation to UNIX format.
sql/log_event.cc:
  Convert file path to UNIX format to build correct query string while replicating
  LOAD DATA INFILE statement.
2005-08-30 22:19:15 +04:00
unknown
43e07c3b91 BUG#12532: Fix for the case when my_malloc is macro
sql/log_event.cc:
  my_malloc can be a macro
2005-08-24 11:14:41 +02:00
unknown
15f626c293 BUG#12532: Fixes after review
sql/log_event.cc:
  Review fixes
sql/sql_parse.cc:
  Review fixes
2005-08-24 01:45:15 +02:00
unknown
7271ea2508 Merge mysql.com:/users/lthalmann/ltx/root/mysql-5.0
into  mysql.com:/users/lthalmann/ltx/dev/mysql-5.0-bug12532


sql/log_event.cc:
  Auto merged
2005-08-24 00:16:58 +02:00