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
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
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
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.
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
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.
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
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.
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.
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.
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
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.
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.
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.
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.
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".
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
- 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())
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.
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
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.
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
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
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.
- 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()
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
- 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
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.