table with backticks
(Thanks to Lu Jingdong, though I did not take his patch directly, as
it contained a significant flaw.)
It wasn't a backtick/parsing problem. We merely didn't anticipate
and allocate enough space to handle the optional "#mysql50#" table-
name prefix.
Now, allocate that extra space in case we need it when we look up
a legacy table to get its file's name.
mysql-test/r/drop.result:
Verify that databases with old-style files can be removed.
mysql-test/t/drop.test:
Verify that databases with old-style files can be removed.
sql/sql_db.cc:
Extend the size of the memory that holds the table's name, so that
the legacy "mysql50" prefix fits.
than max_connections -- which results in user lockout.
The problem was that the variable thread_count that contains
the number of active threads was interpreted as a number of
active connections.
The fix is to introduce a new counter for active connections.
mysql-test/r/connect.result:
A test case for Bug#33507: Event scheduler creates more threads
than max_connections -- which results in user lockout.
mysql-test/t/connect.test:
A test case for Bug#33507: Event scheduler creates more threads
than max_connections -- which results in user lockout.
sql/mysql_priv.h:
1. Polishing: login_connection() and end_connection() need not
to be public.
2. Introduce connection_count -- a variable to contain the number
of active connections. It is protected by LOCK_connection_count.
sql/mysqld.cc:
Use connection_count to count active connections.
sql/sql_connect.cc:
1. Use connection_count to count active connections.
2. Make login_connection(), end_connection() private for the module
as they had to be.
In cases when TRUNCATE was executed by invoking mysql_delete() rather
than by table recreation (for example, when TRUNCATE was issued on
InnoDB table with is referenced by foreign key) triggers were invoked.
In debug builds this also led to crash because of an assertion, which
assumes that some preliminary actions take place before trigger
invocation, which doesn't happen in case of TRUNCATE.
The fix is not to execute triggers in mysql_delete() when this
function is used by TRUNCATE.
mysql-test/r/trigger-trans.result:
Update result file.
mysql-test/t/trigger-trans.test:
A test case for Bug#34643: TRUNCATE crash if trigger and foreign key.
sql/sql_delete.cc:
Do not process triggers in TRUNCATE.
into kaamos.(none):/data/src/opt/mysql-5.1-opt
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/func_time.result:
Manual merge.
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
scripts/mysql_config.sh:
Manual merge.
sql-common/client.c:
Manual merge.
sql/sql_parse.cc:
Manual merge.
into kaamos.(none):/data/src/opt/mysql-5.0-opt
client/mysql.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
scripts/mysql_config.sh:
Manual merge.
Problem: if the IO slave thread is attempting to connect,
STOP SLAVE waits for the attempt to finish.
It may take a long time.
Fix: don't wait, stop the slave immediately.
sql/slave.cc:
Send a SIGALRM signal to the slave thread when stopping it (using
pthread_kill()). This breaks current socket(), connect(), poll() etc.
calls, and makes the subsequent thd->awake() call effective.
Also, move the definition of KICK_SLAVE to slave.cc.
sql/sql_repl.h:
Removed KICK_SLAVE and inlined it in slave.cc because:
- it was only called once, so better to make it local to where it is used
- it needed to include a preprocessor conditional in the middle
into kaamos.(none):/data/src/opt/mysql-5.1-opt
mysql-test/r/func_misc.result:
Auto merged
mysql-test/r/null_key.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/sql_select.cc:
Manual merge.
WHERE f1 < n ignored row if f1 was indexed integer column and
f1 = TYPE_MAX ^ n = TYPE_MAX+1. The latter value when treated
as TYPE overflowed (obviously). This was not handled, it is now.
mysql-test/r/range.result:
show that on an index int column, we no longer disregard
a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
mysql-test/t/range.test:
show that on an index int column, we no longer disregard
a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
sql/opt_range.cc:
Handle overflowing of int-types in range-optimizer.
Unfortunately requires re-indentation of entire block.
Overflow (err == 1) was handled, but only if
field->cmp_type() != value->result_type(), which it
just wasn't in our case.
into mysql.com:/misc/mysql/34749/51-34749
mysql-test/r/func_misc.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
into mysql.com:/misc/mysql/34749/50-34749
mysql-test/r/func_misc.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
into mysql.com:/misc/mysql/34749/51-34749
mysql-test/r/func_misc.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/ha_ndbcluster_cond.cc:
Auto merged
sql/ha_ndbcluster_cond.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
into pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
configure.in:
Auto merged
include/mysql/plugin.h:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/partition_innodb.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/partition_innodb.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
into pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
m_status == DA_OK
Reading from information_scema.tables or information_schema.columns
may cause assertion failure in debug builds. This may happen under
rare circumstances when information_schema fails to get information
about a table (e.g. when a connection is killed).
This happens because open_normal_and_derived_tables() can return an
error without setting an error message in THD. But information_schema
attempts to get an error message from THD unconditionally.
With this fix information_schema attempts to get an error message
from THD only in case error message is set in THD.
mysql-test/r/information_schema.result:
A test case for BUG#34656.
mysql-test/t/information_schema.test:
A test case for BUG#34656.
sql/item_func.cc:
Set proc info to "User sleep".
sql/sql_show.cc:
open_normal_and_derived_tables() can return an error without
setting an error message in THD. That means we must access
error message conditionally, only in case thd->is_error() is
true.
Problem: in mixed and statement mode, a query that refers to a
system variable will use the slave's value when replayed on
slave. So if the value of a system variable is inserted into a
table, the slave will differ from the master.
Fix: mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode and produce a warning
in statement mode. There are some exceptions: some variables are actually
replicated. Those should *not* be marked as unsafe.
BUG#34732: mysqlbinlog does not print default values for auto_increment variables
Problem: mysqlbinlog does not print default values for some variables,
including auto_increment_increment and others. So if a client executing
the output of mysqlbinlog has different default values, replication will
be wrong.
Fix: Always print default values for all variables that are replicated.
I need to fix the two bugs at the same time, because the test cases would
fail if I only fixed one of them.
include/m_ctype.h:
Added definition of ILLEGAL_CHARSET_INFO_NUMBER. We just need a symbol
for a number that will never be used by any charset. ~0U should be safe
since charset numbers are sequential, starting from 0.
mysql-test/include/commit.inc:
Upated test to avoid making statements unsafe.
mysql-test/r/commit_1innodb.result:
Updated test needs updated result file.
mysql-test/r/mysqlbinlog.result:
Updated result file.
mysql-test/r/mysqlbinlog2.result:
Updated result file.
mysql-test/r/user_var-binlog.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_base64_flag.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_unsafe.result:
Modified test file needs modified result file.
mysql-test/suite/binlog/t/binlog_base64_flag.test:
Need to filter out pseudo_thread_id from result since it is
nondeterministic.
mysql-test/suite/binlog/t/binlog_unsafe.test:
Add tests that using variables is unsafe. The 'CREATE VIEW' tests didn't
make sense, so I removed them. SHOW WARNINGS is not necessary either,
because we get warnings for each statement in the result file.
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
Updated result file.
mysql-test/suite/rpl/r/rpl_skip_error.result:
Updated result file.
mysql-test/suite/rpl/t/rpl_skip_error.test:
The test used @@server_id, which is not safe to replicate, so it would
have given a warning. The way it used @@server_id was hackish (issue a
query on master that removes rows only on master), so I replaced it by a
more robust way to do the same thing (connect to slave and insert the
rows only there).
Also clarified what the test case does.
mysql-test/t/mysqlbinlog2.test:
Use --short-form instead of manually filtering out nondeterministic stuff
from mysqlbinlog (because we added the nondeterministic @@pseudo_thread_id
to the output).
sql/item_func.cc:
Added method of Item_func_get_system_var that indicates whether the given
system variable will be written to the binlog or not.
sql/item_func.h:
Added method of Item_func_get_system_var that indicates whether the given
system variable will be written to the binlog or not.
sql/log_event.cc:
- auto_increment_offset was not written to the binlog if
auto_increment_increment=1
- mysqlbinlog did not output default values for some variables
(BUG#34732). In st_print_event_info, we remember for each variable whether
it has been printed or not. This is achieved in different ways for
different variables:
- For auto_increment_*, lc_time_names, charset_database_number,
we set the default values in st_print_event_info to something
illegal, so that it will look like they have changed the first time
they are seen.
- For charset, sql_mode, pseudo_thread_id, we add a flag to
st_print_event_info which indicates whether the variable has been
printed.
- Since pseudo_thread_id is now printed more often, and its value is
not guaranteed to be constant across different runs of the same
test script, I replaced it by a constant if --short-form is used.
- Moved st_print_event_info constructor from log_event.h to log_event.cc,
since it now depends on ILLEGAL_CHARSET_NUMBER, which is defined in
m_ctype.h, which is better to include from a .cc file than from a header
file.
sql/log_event.h:
Added fields to st_print_event_info that indicate whether some of the
variables have been written or not. Since the initialization of
charset_database_number now depends on ILLEGAL_CHARSET_INFO_NUMBER, which
is defined in a header file, which we'd better not include from this
header file -- I moved the constructor from here to log_event.cc.
sql/set_var.cc:
System variables now have a flag binlog_status, which indicates if they
are written to the binlog. If nothing is specified, all variables are
marked as not written to the binlog (NOT_IN_BINLOG) when created. In this
file, the variables that are written to the binlog are marked with
SESSION_VARIABLE_IN_BINLOG.
sql/set_var.h:
Added flag binlog_status to class sys_var. Added a getter and a
constructor parameter that sets it.
Since I had to change sys_var_thd_enum constructor anyways, I simplified
it to use default values of arguments instead of three copies of the
constructor.
sql/sql_yacc.yy:
Mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode. Added comment to
explain strange piece of code just above.
mysql-test/include/diff_tables.inc:
New auxiliary test file that tests whether two tables (possibly one on
master and one on slave) differ.
mysql-test/suite/rpl/r/rpl_variables.result:
New test case needs new result file.
mysql-test/suite/rpl/r/rpl_variables_stm.result:
New test file needs new result file.
mysql-test/suite/rpl/t/rpl_variables.test:
Test that INSERT of @@variables is replicated correctly (by switching to
row-based mode).
mysql-test/suite/rpl/t/rpl_variables_stm.test:
Test that replication of @@variables which are replicated explicitly works
as expected in statement mode (without giving warnings).
MYSQL_TYPE_NEWDECIMAL
Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
we have a working information_schema plugin as part of the source
distribution.
sql/sql_show.cc:
Bug#34367: The fix. Corrected wrong comments and a DBUG_ENTER with wrong
function name.
sql/table.h:
Bug#34367: Added comments to st_field_info.
merging and post-make-test changes.
mysql-test/suite/rpl/r/rpl_report.result:
results changed
mysql-test/suite/rpl/t/rpl_report.test:
correcting test because of non-deterministic select's result
sql/set_var.cc:
compilation issue
into mysql.com:/home/bar/mysql-work/mysql-5.1.b27580
Additonal after merge fix
mysql-test/r/ctype_cp1250_ch.result:
Auto merged
mysql-test/r/ctype_euckr.result:
Auto merged
mysql-test/r/ctype_uca.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_cp1250_ch.test:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
Auto merged
sql/item_create.cc:
After merge fix
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysqltest.c:
Auto merged
mysql-test/r/change_user.result:
Auto merged
mysql-test/t/change_user.test:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
There was a failure in that show slave status displayed a wrong message
when slave stopped at processing a row event inserting to a default-less
column.
The problem seem to have ceased after recent fixes in rbr code.
However, the test was not updated to carry testing of the case commented-out.
Uncommenting and editing the test.
Notice, Bug#23907 is most probably a duplicate of this one.
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
uncommenting the test that previously failed.
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
results changed due to the correct expected error message of an added test
is displayed.
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
results changed to reflect the test changes
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
results changed to reflect the uncommented test
sql/log_event.cc:
correcting of a merge with bug#12713 to use the correct object holding
the error code.
returns wrong results
Casting AVG() to DECIMAL led to incorrect results when the arguments
had a non-DECIMAL type, because in this case
Item_sum_avg::val_decimal() performed the division by the number of
arguments twice.
Fixed by changing Item_sum_avg::val_decimal() to not rely on
Item_sum_sum::val_decimal(), i.e. calculate sum and divide using
DECIMAL arithmetics for DECIMAL arguments, and utilize val_real() with
subsequent conversion to DECIMAL otherwise.
mysql-test/r/func_group.result:
Added a test case for bug #34512.
mysql-test/t/func_group.test:
Added a test case for bug #34512.
sql/item_sum.cc:
Do not use Item_sum_sum::val_decimal() in Item_sum_avg::val_decimal()
because the first one, depending on the arguments type, may return
either the sum of the arguments, or the average calculated by the
virtual val_real() method of Item_sum_avg. Instead, do our own
calculation based on the arguments type.
into chorlton.adsl.perkin.org.uk:/Users/jonathan/mysql/bk/build/5.1
libmysqld/Makefile.am:
Auto merged
scripts/Makefile.am:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/mysql_config.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/unireg.h:
Auto merged
MASTER_POS_WAIT return values are different than expected when the server is not a slave.
It returns -1 instead of NULL.
Fixed with correcting st_relay_log_info::wait_for_pos() to return the proper
value in the case of rli info is not inited.
mysql-test/r/rpl_master_pos_wait.result:
results changed
mysql-test/t/rpl_master_pos_wait.test:
the new test to check that select master_pos_wait() to a server does
not have master info returns NULL as specified.
sql/slave.cc:
changing the return value to correspond the specification.
The initial value of free memory blocks in 0. When the query cache is enabled
a new memory block gets allocated and is assigned number 1. The free memory
block is later split each time query cache memory is allocated for new blocks.
This means that the free memory block counter won't be reduced to zero when
the number of allocated blocks are zero, but rather one. To avoid confusion
this patch changes this behavior so that the free memory block counter is
reset to zero when the query cache is disabled.
Note that when the query cache is enabled and resized the free memory block
counter was still calculated correctly.
mysql-test/r/query_cache.result:
test case
mysql-test/t/query_cache.test:
test case
sql/sql_cache.cc:
Restore the memory block count to 0 for consistency.
into mysql.com:/home/bar/mysql-work/mysql-5.0.b27580v2
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/include/ctype_common.inc:
after merge fix
mysql-test/r/ctype_big5.result:
after merge fix
mysql-test/r/ctype_euckr.result:
after merge fix
mysql-test/r/ctype_gb2312.result:
after merge fix
mysql-test/r/ctype_gbk.result:
after merge fix
mysql-test/r/ctype_uca.result:
after merge fix
The DBUG code emits the current value of the proc_info member of THD,
which may be set to NULL. It was wrong to dereference that value
with the format string %s without verifying that it was valid.
Now, insert an inline test that substitutes the string "(null)" for
NULL pointers.
sql/sql_class.cc:
Dereferencing a NULL is illegal (though not fatal for %s on some
platforms), and we have no assurance that the caller didn't call us
with a valid string.
The cause of the crash is an assertion failure that we do not emit
an error message (grant not found) and then return "ok". The
assertion is valid, and we were ignoring the buggy behavior prior
to the "Diagnostics" result-verification.
Use an error handler to mutate innocuous missing-grant errors, when
removing routines, into warnings.
mysql-test/r/drop.result:
Show that the crash disappears. Also prepare for the larger bug to
be fixed with only minor changes to this test.
mysql-test/t/drop.test:
Show that the crash disappears. Also prepare for the larger bug to
be fixed with only minor changes to this test.
sql/sql_acl.cc:
Disable a segment of code that makes a faulty assumption
about the existence of a routine's defining user, until that
assumption becomes true.
Push a new handler onto the error-handler stack, so that when
removing a routine, a missing ACL grant is now a warning
instead of an error. If any unexpected error is raised then tell
the caller.
sporadically
Under some circumstances, the mysql_insert_id() value after SELECT ...
INSERT could return a wrong value. This could happen when the last
SELECT ... INSERT did not involve an AUTO_INCREMENT column, but the
value of mysql_insert_id() was changed by some previous statements.
Fixed by checking the value of thd->insert_id_used in
select_insert::send_eof() and returning 0 for mysql_insert_id() if it
is not set.
sql/sql_insert.cc:
Do not return thd->last_insert_id unconditionally in
select_insert::send_eof(). First check if thd->insert_id_used is
non-zero, and return 0 otherwise.
tests/mysql_client_test.c:
Added a test case for bug #34889.
There was no way to see if report-{host,port,user,password} were set up.
Fixed with introducing new global variables.
The variables are made read-only because of a possible need to change them
most probably require the slave server restart.
Todo: transform the startup options to be CHANGE master parameters - i.e
to deprecate `report-' options, and to change the new vars
to be updatable at time of CHANGE master executes with new
values.
sql/set_var.cc:
Adding associations of the server init arguments with the new global read-only
variables.
mysql-test/suite/rpl/r/rpl_report.result:
new results file
mysql-test/suite/rpl/t/rpl_report-slave.opt:
options initialize the new global variables.
mysql-test/suite/rpl/t/rpl_report.test:
The new test to check SHOW-ability and SELECT-ablity for the report
global vars.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/log.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/handler.cc:
Manual merge.
sql/sql_update.cc:
Manual merge.
Fixed crash when using other maria block size than 8192
Fixed bug that caused tables to be reported as crashed if maria_log_control was deleted
mysql-test/valgrind.supp:
Suppress leaks on SuSE 10.3, x86 64 bit
sql/mysqld.cc:
Don't give warning in case of timeout for pthread_cond_timedwait
Fixed crashing bug when starting mysqld with --dbug
storage/maria/ha_maria.cc:
Fixed crash when using other block size than 8192 (Crash happend later in bitmap page handling)
storage/maria/ma_locking.c:
When we write a new uuid for a zerofilled file, also update the lsn's
storage/maria/ma_open.c:
Don't update lsn on open. Wait until first time file is changed
Fixed bug that caused tables to be reported as crashed if maria_log_control was deleted
strings/strmake.c:
Fixed warnings for strings without end 0 when running under valgrind.
- Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
to before the late NULLs filtering code.
- Backport function comments from 6.0.
mysql-test/r/null_key.result:
BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
- Testcase
mysql-test/t/null_key.test:
BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
- Testcase
sql/sql_select.cc:
BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
- Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
to before the late NULLs filtering code.
- Backport function comments from 6.0
Problem: logging of utf8-incompatible binary strings didn't work
Fix: hex-encoding of incompatible sequences.
mysql-test/r/log_tables.result:
Adding test
mysql-test/t/log_tables.test:
Adding test
sql/field.cc:
Copying with hex escaping
sql/field.h:
New field flag
sql/log.cc:
Marking the column "general_log.argument" as hex-escaping field.
sql/sql_string.cc:
New function to copy strings with hex-encoding of incompatible characters.
sql/sql_string.h:
Prototype for the new function
and Item_direct_ref constructor calls.
Order of ref->field_name and ref->table_name arguments
is of Item_ref and Item_direct_ref in the fix_inner_refs
function is inverted.
sql/sql_select.cc:
Fixed bug #34830: mixed table and field names in Item_ref
and Item_direct_ref constructor calls.
Order of ref->field_name and ref->table_name arguments
is of Item_ref and Item_direct_ref in the fix_inner_refs
function is inverted. See definitions:
Item_ref(Name_resolution_context *context_arg, Item **item,
const char *table_name_arg, const char *field_name_arg,
bool alias_name_used_arg= FALSE)
and
Item_direct_ref(Name_resolution_context *context_arg, Item **item,
const char *table_name_arg,
const char *field_name_arg,
bool alias_name_used_arg= FALSE)
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of mysql data home directory in
DATA DIRECTORY & INDEX DIRECTORY is disallowed.
mysql-test/r/symlink.result:
test result
mysql-test/t/symlink.test:
test case
sql/mysql_priv.h:
new variable mysql_unpacked_real_data_home
sql/mysqld.cc:
new variable mysql_unpacked_real_data_home
sql/sql_parse.cc:
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of mysql data home directory in
DATA DIRECTORY & INDEX DIRECTORY is disallowed.
READ_ONLY token was accidentally placed into wrong place
('ident' rule). The proper place is in the 'keyword_sp' rule.
The manual should be re-generated after this patch, because
the manual depends on the 'keyword_sp' rule.
sql/sql_yacc.yy:
Move READ_ONLY token to the 'keyword_sp' rule.
into buzz.(none):/home/davi/mysql-5.1-runtime
mysql-test/r/ps.result:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/item.cc:
Auto merged
mysql-test/suite/rpl/r/rpl_user_variables.result:
Manual merge
mysql-test/suite/rpl/t/rpl_user_variables.test:
Manual merge
sql/sql_yacc.yy:
Manual merge
Assertion `0' failed
If ROW item is a part of an expression that also has
aggregate function calls (COUNT/SUM/AVG...), a
"splitting" with an Item::split_sum_func2 function
is applied to that ROW item.
Current implementation of Item::split_sum_func2
replaces this Item_row with a newly created
Item_aggregate_ref reference to it.
Then the row cache tries to work with the
Item_aggregate_ref object as with the Item_row object:
row cache calls row-emulation methods such as cols and
element_index. Item_aggregate_ref (like it's parent
Item_ref) inherits dummy implementations of those
methods from the hierarchy root Item, and call to
them leads to failed assertions and wrong data
output.
Row-emulation virtual functions (cols, element_index, addr,
check_cols, null_inside and bring_value) of Item_ref have
been overloaded to forward calls to an underlying item
reference.
mysql-test/r/row.result:
Added test case for bug #34620.
mysql-test/t/row.test:
Added test case for bug #34620.
sql/item.h:
Fixed bug #34620.
Row-emulation virtual functions (cols, element_index, addr,
check_cols, null_inside and bring_value) of Item_ref have
been overloaded to forward calls to an underlying item
reference.
Rename client_last_error to last_error and client_last_errno to last_errno
to not break connectors which use the internal net structure for error handling.
include/mysql_com.h:
Rename client_last_error to last_error, client_last_errno to last_errno.
include/mysql_h.ic:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysql/libmysql.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysql/manager.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysqld/lib_sql.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysqld/libmysqld.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
server-tools/instance-manager/mysql_connection.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/log_event.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql-common/client.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/log_event_old.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/net_serv.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/repl_failsafe.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
The problem is that passing anything other than a integer to a limit
clause in a prepared statement would fail. This limitation was introduced
to avoid replication problems (e.g: replicating the statement with a
string argument would cause a parse failure in the slave).
The solution is to convert arguments to the limit clause to a integer
value and use this converted value when persisting the query to the log.
mysql-test/r/limit.result:
Update test case result.
mysql-test/r/ps.result:
Add test case result for Bug#33851
mysql-test/r/rpl_user_variables.result:
Test case result for replication of prepared statement with
limit clause.
mysql-test/t/limit.test:
Test parameters to limit clause.
mysql-test/t/ps.test:
Add test case for Bug#33851
mysql-test/t/rpl_user_variables.test:
Test replication of a parameter which value is converted.
sql/item.cc:
Convert value to integer if it's a parameter to a limit clause.
sql/item.h:
Flag signal that item is a parameter to a limit clause.
sql/item_func.cc:
Const member functions, object is not mutated.
sql/sql_class.h:
Const member functions, object is not mutated.
sql/sql_yacc.yy:
Flag that item is a parameter to a limit clause.
into magare.gmz:/home/kgeorge/mysql/work/B34747-5.1-opt
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/subselect.result:
merged bug 34747 and 33266 5.0-opt->5.1-opt
mysql-test/t/subselect.test:
merged bug 34747 and 33266 5.0-opt->5.1-opt
NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was
not seen as constant, but as FUNCTION_UNARY_MINUS(constant)
while we are at the same time pretending it was a basic const
item. This confused the aggregate handlers in exciting ways.
We now make NAME_CONST() behave more consistently.
mysql-test/r/func_misc.result:
show that a combination of NAME_CONST('x', -y) and an aggregate
no longer crashes the server.
mysql-test/t/func_misc.test:
show that a combination of NAME_CONST('x', -y) and an aggregate
no longer crashes the server.
sql/ha_ndbcluster_cond.cc:
tell cluster about "new" function type NEG_FUNC.
(this was previous identified as UNKNOWN_FUNC,
so we just handle it the same way, that's all.)
sql/ha_ndbcluster_cond.h:
tell cluster about "new" function type NEG_FUNC.
(this was previous identified as UNKNOWN_FUNC,
so we just handle it the same way, that's all.)
sql/item.cc:
make NAME_CONST() transparent in that type() of
-constant is that of constant, not that of unary
minus (id est, FUNC_ITEM).
sql/item.h:
Move constructor to item.cc
sql/item_func.h:
Revert Bug#30832; we can apply the magic more narrowly
(just for NAME_CONST() rather than all Item_func_neg).
Introduce new function type "NEG_FUNC."
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of 'mysql data home'/'any db name' in
DATA DIRECTORY & INDEX DIRECTORY is disallowed
mysql-test/r/partition.result:
test result
mysql-test/r/partition_not_windows.result:
result fix
mysql-test/r/partition_symlink.result:
result fix
mysql-test/r/symlink.result:
test result update
mysql-test/t/partition.test:
test case
mysql-test/t/partition_not_windows.test:
test case update
mysql-test/t/partition_symlink.test:
test case update
mysql-test/t/symlink.test:
test case
sql/mysql_priv.h:
new variable mysql_unpacked_real_data_home
sql/mysqld.cc:
new variable mysql_unpacked_real_data_home
sql/partition_info.cc:
new check_partition_dirs() which checks
data directory and index directory for partition elements
sql/partition_info.h:
new check_partition_dirs() which checks
data directory and index directory for partition elements
sql/sql_parse.cc:
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of 'mysql data home'/'any db name' in
DATA DIRECTORY & INDEX DIRECTORY is disallowed
Was a double-free of the Unique member of Item_func_group_concat.
This was not causing a crash because the Unique is a descendent of
Sql_alloc.
Fixed to free the Unique only if it was allocated for the instance
of Item_func_group_concat it was referenced from
mysql-test/r/func_gconcat.result:
Bug #34747: test case
mysql-test/t/func_gconcat.test:
Bug #34747: test case
sql/item_sum.cc:
Bug #34747: free the Unique only if it was allocated
for this instance of Item_func_group_concat
log-slave-updates and circul repl
After merge fixes.
mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt:
Rename: mysql-test/t/rpl_dual_pos_advance-slave.opt -> mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt
mysql-test/include/wait_for_slave_sql_to_stop.inc:
Do not change connection if it was requested by caller (needed for
circular replication tests).
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
Let include/wait_for_slave_sql_to_stop.inc know that we do not want to
change connection to slave.
sql/rpl_rli.cc:
After merge fix.
sql/rpl_rli.h:
After merge fix.
sql/slave.cc:
After merge fix.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_write.c:
Auto merged
storage/myisam/myisamdef.h:
Auto merged
storage/myisam/myisampack.c:
Auto merged
sql/mysqld.cc:
Manual merge with main 5.1 tree.
into mysql.com:/home/svoj/devel/mysql/BUG13861/mysql-5.1-engines
mysql-test/suite/rpl/r/rpl_dual_pos_advance.result:
Auto merged
sql/log_event.cc:
Auto merged
sql/slave.h:
Use local.
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
Manual merge.
sql/slave.cc:
Manual merge.
into mysql.com:/home/hf/work/25097/my51-25097
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/log.cc:
Auto merged
into mysql.com:/home/hf/work/25097/my51-25097
client/mysql.cc:
Auto merged
include/sql_common.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
sql-common/client.c:
merging
sql/log.cc:
merging
There was no way to return an error from the client library
if no MYSQL connections was established.
So here i added variables to store that king of errors and
made functions like mysql_error(NULL) to return these.
client/mysql.cc:
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
Show the error message on std_error
include/sql_common.h:
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
cant_connect_sqlstate constant declared
libmysql/libmysql.c:
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
mysql_sqlstate(NULL) returns 'unknown_sqlstate'
libmysqld/lib_sql.cc:
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
EMBEDDED_SERVER version of the vprint_msg_to_log() implemented
sql-common/client.c:
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
mysql_server_last_errno and mysql_server_last_error introduced
to store errors not related to particular connections.
mysql_error(NULL) and mysql_errno(NULL) now returns these
mysql_server_last_error and errno respectively
sql/log.cc:
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
EMBEDDED_LIBRARY implementation of the vprint_msg_to_log() moved
to lib_sql.cc
mysys/my_getsystime.c:
Added extra parenthesis to apply cast to the whole result.
sql/mysqld.cc:
Reversed a wrong patch. This should however be made
better in the future in my_getopt.h, having own define
for GET_HA_ROWS.
into quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
client/mysqltest.c:
Auto merged
mysql-test/r/view.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
Manually merged.
mysql-test/t/disabled.def:
Manually merged.
Bug#34678 @@debug variable's incremental mode
The problem is that the per-thread debugging settings stack wasn't
being deallocated before the thread termination, leaking the stack
memory. The chosen solution is to push a new state if the current
is set to the initial settings and pop it (free) once the thread
finishes.
dbug/dbug.c:
Move dbug parser out of _db_set_ to a separate function and
make _db_set_ push a new stack if the corrent one is set to
the initial settings.
dbug/user.r:
Update DBUG_SET description.
mysql-test/t/disabled.def:
Re-enable test case which triggered the leak.
mysys/my_thr_init.c:
Pop a pushed state, nop if stack is empty.
sql/set_var.cc:
Handle incremental debug settings.
mysql-test/r/variables_debug.result:
Add new test case result for Bug#34678
mysql-test/t/variables_debug.test:
Add new test case for Bug#34678
Fixed a missed case in the patch for Bug#31931.
Also makes Bug#33722 a duplicate of Bug#31931.
Added tests for better coverage.
Replaced some legacy function calls.
mysql-test/r/partition.result:
Added tests for better coverage
mysql-test/r/partition_datatype.result:
Added tests for better coverage
mysql-test/r/partition_error.result:
Added tests for better coverage
mysql-test/suite/parts/inc/partition_engine.inc:
Bug#31931: Mix of handlers error message
Bug#33722 is fixed within this patch too
mysql-test/suite/parts/r/partition_engine_innodb.result:
Bug#31931: Mix of handlers error message
Bug#33722 is fixed within this patch too
mysql-test/suite/parts/r/partition_engine_myisam.result:
Bug#31931: Mix of handlers error message
Bug#33722 is fixed within this patch too
mysql-test/t/partition.test:
Added tests for better coverage
mysql-test/t/partition_datatype.test:
Added tests for better coverage
mysql-test/t/partition_error.test:
Added tests for Bug#31931
sql/partition_info.cc:
Bug#31931: Mix of handlers error message
Fixed case where given info->db_type not matched
thd->lex->create_info.db_type
And the check for inconsistent subpartition engines-clauses.
sql/sql_partition.cc:
Changed ha_legacy_type to ha_resolve_storage_engine_name
sql/sql_table.cc:
Changed ha_legacy_type to ha_resolve_storage_engine_name
The problem is that the commands COM_STMT_CLOSE, COM_STMT_RESET,
COM_STMT_SEND_LONG_DATA weren't being logged to the general log.
The solution is to log the general log the aforementioned commands.
mysql-test/t/mysql_client_test-master.opt:
Also log to table.
sql/sql_prepare.cc:
Log COM_STMT_CLOSE, COM_STMT_RESET and COM_STMT_SEND_LONG_DATA.
tests/mysql_client_test.c:
Add test case for Bug#28386
into kaamos.(none):/data/src/opt/bug33834/my51-bug33834
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/sql_yacc.yy:
Manual merge.
documentation
While the manual mentions FRAC_SECOND only for the TIMESTAMPADD()
function, it was also possible to use FRAC_SECOND with DATE_ADD(),
DATE_SUB() and +/- INTERVAL.
Fixed the parser to match the manual, i.e. using FRAC_SECOND for
anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a
syntax error.
Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/
TIMESTAMPDIFF and marks FRAC_SECOND as deprecated.
mysql-test/r/func_time.result:
Added a test case for bug #33834.
mysql-test/t/func_time.test:
Added a test case for bug #33834.
sql/sql_yacc.yy:
Reject FRAC_SECOND for anything other than TIMESTAMPADD() or
TIMESTAMPDIFF().
Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF().
Warn about FRAC_SECOND being a deprecated unit.
Test file fixes for bugs 20129, 31931 and 34225
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result:
Manual merge, new test case to be modified for Bug#20129
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
Manual merge, new test case to be modified for Bug#20129
mysql-test/suite/parts/r/partition_engine_innodb.result:
Manual merge, fix for bug#31931
mysql-test/suite/parts/r/partition_engine_myisam.result:
Manual merge, fix for bug#31931
mysql-test/suite/parts/t/disabled.def:
These should work now since Bug#34225 is fixed
sql/ha_partition.cc:
Bug#20129: partition maintenance command not working with crashed tables
Fix for compiler warnings.
into witty.:/Users/mattiasj/clones/topush-51
mysql-test/r/partition.result:
Auto merged
mysql-test/suite/ndb/r/ndb_partition_key.result:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_key.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/partition_info.cc:
SCCS merged
into mysql.com:/misc/mysql/99999/51-99999
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
If setting a system-variable provided by a plug-in failed, no OK or
error was sent in some cases, hanging the client. We now send an error
in the case from the ticket (integer-argument out of range in STRICT
mode). We also provide a semi-generic fallback message for possible
future cases like this where an error is signalled, but no message is
sent to the client. The error/warning handling is unified so it's the
same again for variables provided by plugins and those in the server
proper.
mysql-test/r/plugin.result:
show that on out-of-range values, plugin interface throws errors
in STRICT mode and warnings otherwise.
mysql-test/t/plugin.test:
show that on out-of-range values, plugin interface throws errors
in STRICT mode and warnings otherwise.
sql/set_var.cc:
- handle signedness of values used in warnings
- in STRICT mode, throw errors rather than warnings
sql/sql_parse.cc:
If sql_set_variables() returns with an error but no message
was sent to the client, send a semi-generic one so the session
won't hang and we won't fail silently.
sql/sql_plugin.cc:
throw a warning if more than just block-size was corrected
(or an error in STRICT mode). use functions from set_var
for uniform behaviour of server- and plug-in variables.
storage/example/ha_example.cc:
Add a ULONG system variable to example plugin so
we can test integers in the plugin-interface without
having to depend on the presence of innobase.
SQL-mode PAD_CHAR_TO_FULL_LENGTH affected mysqld's user-table too. If
enabled, user-name and host were space-padded and no longer matched
the login-data of incoming connexions.
Patch disregards pad-flag while loading privileges so ability to log
in does not depend on SQL-mode.
mysql-test/r/sql_mode.result:
show that SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' does not affect
loading of privileges (and by extension, ability to log in).
mysql-test/t/sql_mode.test:
show that SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' does not affect
loading of privileges (and by extension, ability to log in).
sql/sql_acl.cc:
temporarily disable SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' while
reloading privileges
In BENCHMARK(count, expr), count could overflow/wrap-around.
Patch changes to a sufficiently large data-type. Adds a warning
for negative count values.
mysql-test/r/func_str.result:
show that a negative 'count' for BENCHMARK(count, expr)
throws a warning and returns NULL.
mysql-test/t/func_str.test:
show that a negative 'count' for BENCHMARK(count, expr)
throws a warning and returns NULL.
sql/item_func.cc:
use ulonglong rather than ulong in BENCHMARK(count, expr)
throw warning on negative 'count'; return SQL-NULL.
The check_global_access() function was made available to InnoDB, but
was not defined in the embedded server library. InnoDB, as a plugin,
is not recompiled when the embedded server is built. This caused a
link failure when compiling applications which use the embedded server.
The fix here is to always define check_global_access() externally; in
the embedded server case, it is defined to just return OK.
Also, don't run the test case for this bug in embedded server.
mysql-test/t/innodb_bug34053.test:
Disable this test on embedded server - it tests privilege
checks which are not in place there.
sql/mysql_priv.h:
Since check_global_access() may be used from some storage engine plugins
(InnoDB, currently), and the plugins are not recompiled for the embedded
server, it must be defined externally even for NO_EMBEDDED_ACCESS_CHECKS.
sql/sql_parse.cc:
Since check_global_access() may be used from some storage engine plugins
(InnoDB, currently), and the plugins are not recompiled for the embedded
server, it must be defined externally even for NO_EMBEDDED_ACCESS_CHECKS.
into kaamos.(none):/data/src/opt/bug33049/my51-bug33790
mysql-test/r/view.result:
Auto merged
sql/item_sum.cc:
Auto merged
mysql-test/t/view.test:
Manual merge.
Disabled events weren't removed from the memory queue after the scheduler has been
re-enabled. After recalculation of next execution time of an event, it might get disabled.
sql/event_queue.cc:
Sort the event queue in a way that the disabled events will always be
at the end. We will use this for cleaning it, starting from the end.
After recalculating times in the queue, after the scheduler has been enabled
after disabled state, the queue should be cleaned from DISABLED events.
The queue is sorted in a way such that the disabled events are at the end.
Thus, we can start from the end of the queue and remove all DISABLED till we
find the first with different state.
sql/events.cc:
Add a comment about possible problem with replication of events,
disabled events and server restarts.
into trift2.:/MySQL/M51/push-5.1
configure.in:
Auto merged
extra/yassl/src/handshake.cpp:
Auto merged
extra/yassl/src/template_instnt.cpp:
Auto merged
extra/yassl/src/yassl_imp.cpp:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
storage/ndb/src/common/util/OutputStream.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
Auto merged
storage/ndb/tools/waiter.cpp:
Auto merged
log-slave-updates and circul repl
Slave SQL thread may execute one extra event when there are events
skipped by slave I/O thread (e.g. originated by the same server).
Whereas it was requested not to do so by the UNTIL condition.
This happens because we compare with the end position of previously
executed event. This is fine when there are no skipped by slave I/O
thread events, as end position of previous event equals to start
position of to be executed event. Otherwise this position equals to
start position of skipped event.
This is fixed by:
- reading the event to be executed before checking if the until condition
is satisfied.
- comparing the start position of the event to be executed. Since we do
not have the start position available, we compute it by subtracting
event length from end position (which is available).
- if there are no events on the event queue at the slave sql starting
time, that meet until condition, we stop immediately, as in this
case we do not want to wait for next event.
mysql-test/r/rpl_dual_pos_advance.result:
A test case for BUG#13861.
mysql-test/t/rpl_dual_pos_advance.test:
A test case for BUG#13861.
sql/log_event.cc:
Store length of event. This is needed for further calculation of
the beginning of event.
sql/slave.cc:
Slave SQL thread may execute one extra event when there are events
skipped by slave I/O thread (e.g. originated by the same server).
Whereas it was requested not to do so by the UNTIL condition.
This happens because we compare with the end position of previously
executed event. This is fine when there are no skipped by slave I/O
thread events, as end position of previous event equals to start
position of to be executed event. Otherwise this position equals to
start position of skipped event.
This is fixed by:
- reading the event to be executed before checking if the until condition
is satisfied.
- comparing the start position of the event to be executed. Since we do
not have the start position available, we compute it by subtracting
event length from end position (which is available).
- if there are no events on the event queue at the slave sql starting
time, that meet until condition, we stop immediately, as in this
case we do not want to wait for next event.
sql/slave.h:
Added master_log_pos parametr to is_until_satisfied().
mysql-test/t/rpl_dual_pos_advance-slave.opt:
New BitKeeper file ``mysql-test/t/rpl_dual_pos_advance-slave.opt''
into magare.gmz:/home/kgeorge/mysql/work/B30604-5.1-opt
BitKeeper/deleted/.del-binlog_innodb.result:
Auto merged
BitKeeper/deleted/.del-binlog_innodb.test:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
merged bug 30604 to 5.1-opt
sql/sp.cc:
merged bug 30604 to 5.1-opt
between 5.0 and 5.1.
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
- be completely in UTF8;
- not contain character set introducers.
For more information, see WL4052.
mysql-test/include/ddl_i18n.check_views.inc:
Add a test case for Bug#30217.
mysql-test/r/ddl_i18n_koi8r.result:
Update result file.
mysql-test/r/ddl_i18n_utf8.result:
Update result file.
mysql-test/r/information_schema.result:
Update result file.
mysql-test/r/information_schema_db.result:
Update result file.
mysql-test/r/mysqldump.result:
Update result file.
mysql-test/r/show_check.result:
Update result file.
mysql-test/t/ddl_i18n_koi8r.test:
Add a test case for Bug#30217.
mysql-test/t/ddl_i18n_utf8.test:
Add a test case for Bug#30217.
mysql-test/t/mysqldump.test:
Add a test case for Bug#30217.
sql/ha_ndbcluster.cc:
Add a parameter to print().
sql/item.cc:
1. Add a parameter to print().
2. Item_string::print():
- Do not append character set introducer to the text literal
if we're building a query for INFORMATION_SCHEMA;
- Convert text literal to UTF8 if we're building a query
for INFORMATION_SCHEMA.
sql/item.h:
Add a parameter to print().
sql/item_cmpfunc.cc:
Add a parameter to print().
sql/item_cmpfunc.h:
Add a parameter to print().
sql/item_func.cc:
Add a parameter to print().
sql/item_func.h:
Add a parameter to print().
sql/item_geofunc.h:
Add a parameter to print().
sql/item_row.cc:
Add a parameter to print().
sql/item_row.h:
Add a parameter to print().
sql/item_strfunc.cc:
Add a parameter to print().
sql/item_strfunc.h:
Add a parameter to print().
sql/item_subselect.cc:
Add a parameter to print().
sql/item_subselect.h:
Add a parameter to print().
sql/item_sum.cc:
Add a parameter to print().
sql/item_sum.h:
Add a parameter to print().
sql/item_timefunc.cc:
Add a parameter to print().
sql/item_timefunc.h:
Add a parameter to print().
sql/mysql_priv.h:
Add a parameter to print().
sql/sp_head.cc:
Add a parameter to print().
sql/sql_lex.cc:
Add a parameter to print().
sql/sql_lex.h:
Add a parameter to print().
sql/sql_parse.cc:
Add a parameter to print().
sql/sql_select.cc:
Add a parameter to print().
sql/sql_show.cc:
Add a parameter to print().
sql/sql_test.cc:
Add a parameter to print().
sql/sql_view.cc:
Build INFORMATION_SCHEMA query from Item-tree.
sql/sql_yacc.yy:
Build INFORMATION_SCHEMA query from Item-tree.
sql/table.h:
Add a parameter to print().
suite)
Under some circumstances a combination of aggregate functions and
GROUP BY in a SELECT query over a VIEW could lead to incorrect
calculation of the result type of the aggregate function. This in
turn could result in incorrect results, or assertion failures on debug
builds.
Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that
the argument's item is dereferenced before calling its type() method.
mysql-test/r/view.result:
Added a test case for bug #33049.
mysql-test/t/view.test:
Added a test case for bug #33049.
sql/item_sum.cc:
When calculating the result type of an aggregate function, dereference
the argument's item before calling its type() method.
skip lock_type update for temporary tables
mysql-test/r/tablelock.result:
test result
mysql-test/t/tablelock.test:
test case
sql/sql_base.cc:
skip lock_type update for temporary tables
into buzz.(none):/home/davi/mysql-5.1-runtime
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/sql_view.h:
Auto merged
sql/item.h:
Manual merge
sql/sql_prepare.cc:
Manual merge
sql/sql_view.cc:
Manual merge
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.
The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.
mysql-test/r/ps.result:
Add test case result for Bug#32890
mysql-test/t/ps.test:
Add test case for Bug#32890
sql/item.h:
Restore original field name if name is auto generated.
sql/sql_prepare.cc:
Validate and prepare a CREATE VIEW statement for execution.
sql/sql_view.cc:
Move privileges check to it's own function.
sql/sql_view.h:
Export function which check privileges of a CREATE VIEW statement.
sending SIGHUP.
There were two problems:
- after some recent fix, the server started to crash after
receiving SIGHUP. That happened because LEX of new THD-object
was not properly initialized.
- user-specified log options were ignored when logs were reopened.
The fix is to 1) initialize LEX and 2) take user-specified options
into account.
There is no test case in this CS, because our test suite does not
support sending SIGHUP to the server.
sql/mysqld.cc:
Use proper logging after SIGHUP.
sql/sql_parse.cc:
Initialize LEX of new THD -- it is required to avoid crash
in SIGHUP handling.
a table name.
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
The fix is to ensure that an error is thrown even if the table
is in the cache.
(This is a backport of the original patch for 5.1)
mysql-test/r/view.result:
Fix result file.
mysql-test/r/view_grant.result:
Fix result file.
mysql-test/t/view.test:
Add a test case for Bug#34337: Server crash when Altering a view
using a table name.
mysql-test/t/view_grant.test:
Fix order-dependency.
sql/sql_view.cc:
Report an error if we're going to work with a table.
mysql-test/r/view.result:
Drop created view.
mysql-test/t/view.test:
Update test result.
sql/sql_cursor.cc:
Fix compilation failure.
tests/mysql_client_test.c:
Manual merge.
into wva.:C:/bk/bug31745_2/mysql-5.1-build
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/stacktrace.h:
Auto merged
sql/stacktrace.c:
SCCS merged
"Server_IO_State" field
Critical error messages from get_master_version_and_clock() were written
only to the slave errorlog while Show slave status did not display any
incident happened.
Although the artifact was reported for a particular --replicate-same-server-id
related issue the fix refines all critical error reporting with
deploying rli->report().
The test for the bug covers only --replicate-same-server-id error reporting.
mysql-test/suite/rpl/r/rpl_server_id1.result:
new results reflecting changes
mysql-test/suite/rpl/t/rpl_server_id1.test:
Preserving the idea of the test unnecessary queries and the sleep are
eliminated.
In the end the slave must stop with the error displayable via $$$.
sql/slave.cc:
improving get_master_version_and_clock() code to report a critical incident
via rli->report() that takes care of bothe the error log and
the slave's status info placeholders.
A critical error that force the IO slave thread to terminate is handled
immediately (goto err).
into mysql.com:/Users/davi/mysql/mysql-5.1-runtime
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_view.cc:
Auto merged
The problem is that when a stored procedure is being parsed for
the first execution, the body is copied to a temporary buffer
which is disregarded sometime after the statement is parsed.
And during this parsing phase, the rule for CREATE VIEW was
holding a reference to the string being parsed for use during
the execution of the CREATE VIEW statement, leading to invalid
memory access later.
The solution is to allocate and copy the SELECT of a CREATE
VIEW statement using the thread memory root, which is set to
the permanent arena of the stored procedure.
mysql-test/r/view.result:
Add test case result for Bug#34587
mysql-test/t/view.test:
Add test case for Bug#34587
sql/sql_lex.h:
Remove start and end position variables. The SELECT of a
CREATE VIEW is now allocated at parse time.
sql/sql_view.cc:
Remove assertion that is not true when the statement is
being re-executed. Use string that was trimmed of leading
and trailing whitespace at parse time.
sql/sql_yacc.yy:
Allocate the SELECT of a CREATE VIEW using the current thread
memory root and remove any leading and trailing whitespace.
Executing a prepared statement associated with a materialized
cursor yields to the client a metadata packet with wrong table
and database names. The problem was occurring because the server
was sending the the name of the temporary table used by the cursor
instead of the table name of the original table. The same problem
occurs when selecting from views, in which case the table name was
being sent and not the name of the view.
The solution is to fill the list item from the temporary table but
preserving the table and database names of the original fields. This
is achieved by tweaking the Select_materialize to accept a pointer to
the Materialized_cursor class which contains the item list to be filled.
sql/sql_cursor.cc:
Fill the item list in the send_fields method and preserve
the table and database name of the fields.
tests/mysql_client_test.c:
Add test case for Bug#32265
a table name.
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
The fix is to ensure that an error is thrown even if the table
is in the cache.
mysql-test/r/view.result:
Fix result file.
mysql-test/t/view.test:
Add a test case for Bug#34337: Server crash when Altering a view
using a table name.
sql/sql_view.cc:
Report an error if we're going to work with a table.
into mysql.com:/home/svoj/devel/mysql/BUG34289/mysql-5.1-engines
mysql-test/r/func_misc.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item.cc:
Auto merged
mysql-test/r/change_user.result:
Replaced value in result file, it was dependend on architecture.
mysql-test/t/change_user.test:
Replaced an architecture dependend value in test
sql/mysqld.cc:
Can be made shorter and without ifdefs.
Minor update with corrections and notes on the binlog format.
This only affects comments, not code.
sql/log_event.h:
Fixes in documentation of binlog format.
into kaamos.(none):/data/src/opt/mysql-5.1-opt
configure.in:
Auto merged
mysql-test/r/strict.result:
Auto merged
sql/field.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/unireg.h:
Auto merged
floating point numbers
Some math functions did not check if the result is a valid number
(i.e. neither of +-inf or nan).
Fixed by validating the result where necessary and returning NULL in
case of invalid result.
BitKeeper/deleted/.del-matherr.c:
Rename: sql/matherr.c -> BitKeeper/deleted/.del-matherr.c
configure.in:
Removed DONT_USE_FINITE, it is not used anywhere.
include/my_global.h:
isfinite() is a C99 macro which absoletes finite(). First try to use
it, then fall back to finite() if the target platform has it,
otherwise use our own implementation.
mysql-test/r/func_math.result:
Added a test case for bug #31236.
mysql-test/r/strict.result:
Fixed a test case which relied on old behavior.
mysql-test/t/func_math.test:
Added a test case for bug #31236.
mysql-test/t/strict.test:
Fixed a test case which relied on old behavior.
sql/field.cc:
No need to check if the finite() or its equivalent is available.
sql/item_func.cc:
Use fix_result() wherever the result can be one of +-inf or nan,
assuming the function arguments are valid numbers.
Removed fix_result() from functions that are defined for all possible
input numbers.
sql/item_func.h:
Moved fix_result() from Item_dec_func to Item_func which is a common
ancestor for Item_dec_func and Item_num_op.
sql/unireg.h:
Removed POSTFIX_ERROR because no code returns it.
"crash on hpita: Invalid address alignment"
Replace dangerous pointer arithmetic - it may occurr where sizeof(int) is
less than size of machine alignment requirement.
include/mysql/plugin.h:
bug34598
change of update func prototype
sql/sql_plugin.cc:
bug34598
Avoid dangerous pointer arithmetic which can cause unaligned word access.
Change of update function prototype
Fixes the following bugs:
- Bug #33349: possible race condition revolving around data dictionary and repartitioning
Introduce retry/sleep logic as a workaround for a transient bug
where ::open fails for partitioned tables randomly if we are using
one file per table.
- Bug #34053: normal users can enable innodb_monitor logging
In CREATE TABLE and DROP TABLE check whether the table in question is one
of the magic innodb_monitor tables and whether the user has enough rights
to mess with it before doing anything else.
- Bug #22868: 'Thread thrashing' with > 50 concurrent conns under an upd-intensive workloadw
- Bug #29560: InnoDB >= 5.0.30 hangs on adaptive hash rw-lock 'waiting for an X-lock'
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
- Bug #30930: Add auxiliary function to retrieve THD::thread_id
Add thd_get_thread_id() function. Also make check_global_access() function
visible to InnoDB under INNODB_COMPATIBILITY_HOOKS #define.
include/mysql/plugin.h:
Add thd_get_thread_id() accessor function
mysql-test/r/innodb.result:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2261:
branches/5.1: Merge a change from MySQL AB:
ChangeSet@2007-10-13 15:49:42+03:00, aelkin@koti.dsl.inet.fi
Bug #29136 erred multi-delete on trans table does not rollback the statement
innodb.test, innodb.result: trans table specific test added
mysql-test/t/innodb.test:
Applied InnoDB snapshot innodb-5.1-ss2298
sql/mysql_priv.h:
Make check_global_access() declaration available if when
INNODB_COMPATIBILITY_HOOKS is defined.
sql/sql_class.cc:
Add thd_get_thread_id() accessor function.
Add 'extern "C"' to definition for thd_get_xid(). Not strictly
needed, but in keeping with our coding style.
storage/innobase/btr/btr0cur.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2295:
branches/5.1:
Merge r2294 from branches/5.0:
Fix typo and add comma in comment.
storage/innobase/handler/ha_innodb.cc:
Applied InnoDB snapshot innodb-5.1-ss2298
- But remove the declaration of check_global_access() from ha_innodb.cc,
because it is now visible in mysql_priv.h under INNODB_COMPATIBILITY_HOOKS
Revision r2270:
branches/5.1:
Rename the user visible parameter innodb-use-adaptive-hash-indexes to
innodb-adaptive-hash-index so that it is in sync with MySQL 5.0.
Suggested by: Heikki
Approved by: Heikki
Revision r2236:
branches/5.1: bug#33349
Introduce retry/sleep logic as a workaround for a transient bug
where ::open fails for partitioned tables randomly if we are using
one file per table.
Reviewed by: Heikki
Revision r2282:
branches/5.1:
Fix Bug#34053:
* In CREATE TABLE and DROP TABLE check whether the table in question is one
of the magic innodb_monitor tables and whether the user has enough rights
to mess with it before doing anything else.
* Implement a mysql-test testcase.
Approved by: Heikki
Revision r2246:
branches/5.1:
Fix formatting of the autoinc-lock-mode command line parameter.
Old view (./mysqld --help --verbose):
--innodb-autoinc-lock-mode=#
The AUTOINC lock modes supported by InnoDB:
0 => Old
style AUTOINC locking (for backward compatibility)
1 =>
New style AUTOINC locking
2 => No AUTOINC locking
(unsafe for SBR)
New view:
--innodb-autoinc-lock-mode=#
The AUTOINC lock modes supported by InnoDB:
0 => Old style AUTOINC locking (for backward
compatibility)
1 => New style AUTOINC locking
2 => No AUTOINC locking (unsafe for SBR)
Looks like these strings are "automatically" wrapped by MySQL in the
following way:
* newlines (\n) in the string are ignored
* newline separator (\n) is inserted every 57 or so characters.
* lots of white space is appended to each inserted new line.
Approved by: Heikki
storage/innobase/include/os0sync.h:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/include/read0read.h:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2188:
branches/5.1: Remove unused field can_be_too_old from read_view_struct.
storage/innobase/include/row0mysql.h:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2282:
branches/5.1:
Fix Bug#34053:
* In CREATE TABLE and DROP TABLE check whether the table in question is one
of the magic innodb_monitor tables and whether the user has enough rights
to mess with it before doing anything else.
* Implement a mysql-test testcase.
Approved by: Heikki
Revision r2272:
branches/5.1:
Fix typo in comment.
storage/innobase/include/sync0arr.h:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/include/sync0rw.h:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/include/sync0rw.ic:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/include/sync0sync.h:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/include/sync0sync.ic:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/os/os0sync.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/read/read0read.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2188:
branches/5.1: Remove unused field can_be_too_old from read_view_struct.
storage/innobase/row/row0mysql.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2282:
branches/5.1:
Fix Bug#34053:
* In CREATE TABLE and DROP TABLE check whether the table in question is one
of the magic innodb_monitor tables and whether the user has enough rights
to mess with it before doing anything else.
* Implement a mysql-test testcase.
Approved by: Heikki
Revision r2272:
branches/5.1:
Fix typo in comment.
storage/innobase/srv/srv0srv.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/sync/sync0arr.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/sync/sync0rw.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
storage/innobase/sync/sync0sync.c:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2268:
branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.
Reviewed by: Heikki
mysql-test/r/innodb_bug34053.result:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2282:
branches/5.1:
Fix Bug#34053:
* In CREATE TABLE and DROP TABLE check whether the table in question is one
of the magic innodb_monitor tables and whether the user has enough rights
to mess with it before doing anything else.
* Implement a mysql-test testcase.
Approved by: Heikki
mysql-test/t/innodb_bug34053.test:
Applied InnoDB snapshot innodb-5.1-ss2298
Revision r2282:
branches/5.1:
Fix Bug#34053:
* In CREATE TABLE and DROP TABLE check whether the table in question is one
of the magic innodb_monitor tables and whether the user has enough rights
to mess with it before doing anything else.
* Implement a mysql-test testcase.
Approved by: Heikki
and ps-protocol
Finding a routine should be a transparent operation as
far as the binary log is concerned.
But it was influencing the binary log because of the TIMESTAMP
column in the proc table.
Fixed by preserving and restoring the time_zone usage flag when
searching for a stored routine in the proc table.
mysql-test/r/binlog_innodb.result:
Bug #30604: test case
mysql-test/r/ctype_cp932_binlog.result:
Bug #30604: updated test results (a procedure call before that)
mysql-test/t/binlog_innodb.test:
Bug #30604: test case
sql/sp.cc:
Bug #30604: finding a routine should be a transparent operation as
far as the binary log is concerned.
Fixed by preserving and restoring the time_zone usage flag.
breaks replication
NAME_CONST() didn't replicate constant character set and collation
correctly.
With this fix NAME_CONST() inherits collation from the value argument.
mysql-test/r/func_misc.result:
A test case for BUG#34289.
mysql-test/t/func_misc.test:
A test case for BUG#34289.
sql/item.cc:
Inherit collation from value argument.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/slave.cc:
Auto merged
into wva.:C:/bk/bug31745_2/my51_31754_2
sql/CMakeLists.txt:
Auto merged
sql/stacktrace.c:
Auto merged
sql/sql_parse.cc:
merge.
sql/mysqld.cc:
merge
sql/stacktrace.h:
merge
into dipika.(none):/opt/local/work/mysql-5.1-2pc-opt-merge-push
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
Manual merge.
a SELECT doesn't cause ROLLBACK of statem".
The idea of the fix is to ensure that we always commit the current
statement at the end of dispatch_command(). In order to not issue
redundant disc syncs, an optimization of the two-phase commit
protocol is implemented to bypass the two phase commit if
the transaction is read-only.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Update test results.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Update test results.
mysql-test/suite/rpl_ndb/t/disabled.def:
Disable the tests, for which this changeset reveals a bug:
the injector thread does not always add 'statement commit' to the
rows injected in circular replication set up.
To be investigated separately.
sql/ha_ndbcluster_binlog.cc:
Add close_thread_tables() to run_query: this ensures
that all tables are closed and there is no pending statement transaction.
sql/handler.cc:
Implement optimisation of read-only transactions.
If a transaction consists only of DML statements that do not change
data, we do not perform a two-phase commit for it
(run one phase commit only).
sql/handler.h:
Implement optimisation of read-only transactions.
If a transaction consists only of DML statements that do not change
data, we do not perform a two-phase commit for it
(run one phase commit only).
sql/log.cc:
Mark the binlog transaction read-write whenever it's started.
We never read from binlog, so it's safe and least intrusive to add
this mark up here.
sql/log_event.cc:
Update to the new layout of thd->transaction.
sql/rpl_injector.cc:
Always commit statement transaction before committing the global one.
sql/sp.cc:
Ad comments.
sql/sp_head.cc:
Add comments.
sql/sql_base.cc:
Commit transaction at the end of the statement. Always.
sql/sql_class.cc:
Update thd_ha_data to return the right pointer in the new layout.
Fix select_dumpvar::send_data to properly return operation status.
A test case from commit.inc would lead to an assertion failure in the
diagnostics area (double assignment). Not test otherwise by the test suite.
sql/sql_class.h:
Implement a new layout of storage engine transaction info in which
it is easy to access all members related to the handlerton only
based on ht->slot.
sql/sql_cursor.cc:
Update to the new layout of thd->transaction.
sql/sql_delete.cc:
Remove wrong and now redundant calls to ha_autocommit_or_rollback.
The transaction is committed in one place, at the end of the statement.
Remove calls to mysql_unlock_tables, since some engines count locks
and commit statement transaction in unlock_tables(), which essentially
equates mysql_unlock_tables to ha_autocommit_or_rollback.
Previously it was necessary to unlock tables soon because we wanted
to avoid sending of 'ok' packet to the client under locked tables.
This is no longer necessary, since OK packet is also sent from one place
at the end of transaction.
sql/sql_do.cc:
Add DO always clears the error, we must rollback the current
statement before this happens. Otherwise the statement will be committed,
and not rolled back in the end.
sql/sql_insert.cc:
Remove wrong and now redundant calls to ha_autocommit_or_rollback.
The transaction is committed in one place, at the end of the statement.
Remove calls to mysql_unlock_tables, since some engines count locks
and commit statement transaction in unlock_tables(), which essentially
equates mysql_unlock_tables to ha_autocommit_or_rollback.
Previously it was necessary to unlock tables soon because we wanted
to avoid sending of 'ok' packet to the client under locked tables.
This is no longer necessary, since OK packet is also sent from one place
at the end of transaction.
sql/sql_load.cc:
Remove wrong and now redundant calls to ha_autocommit_or_rollback.
The transaction is committed in one place, at the end of the statement.
Remove calls to mysql_unlock_tables, since some engines count locks
and commit statement transaction in unlock_tables(), which essentially
equates mysql_unlock_tables to ha_autocommit_or_rollback.
Previously it was necessary to unlock tables soon because we wanted
to avoid sending of 'ok' packet to the client under locked tables.
This is no longer necessary, since OK packet is also sent from one place
at the end of transaction.
sql/sql_parse.cc:
Implement optimisation of read-only transactions: bypass 2-phase
commit for them.
Always commit statement transaction before commiting the global one.
Fix an unrelated crash in check_table_access, when called from
information_schema.
sql/sql_partition.cc:
Partitions commit at the end of a DDL operation.
Make sure that send_ok() is done only if the commit has succeeded.
sql/sql_table.cc:
Use ha_autocommit_or_rollback and end_active_trans everywhere.
Add end_trans to mysql_admin_table, so that it leaves no pending
transaction.
sql/sql_udf.cc:
Remvove a redundant call to close_thread_tables()
sql/sql_update.cc:
Remove wrong and now redundant calls to ha_autocommit_or_rollback.
The transaction is committed in one place, at the end of the statement.
Remove calls to mysql_unlock_tables, since some engines count locks
and commit statement transaction in unlock_tables(), which essentially
equates mysql_unlock_tables to ha_autocommit_or_rollback.
Previously it was necessary to unlock tables soon because we wanted
to avoid sending of 'ok' packet to the client under locked tables.
This is no longer necessary, since OK packet is also sent from one place
at the end of transaction.
mysql-test/include/commit.inc:
New BitKeeper file ``mysql-test/include/commit.inc''
mysql-test/r/commit_1innodb.result:
New BitKeeper file ``mysql-test/r/commit_1innodb.result''
mysql-test/t/commit_1innodb.test:
New BitKeeper file ``mysql-test/t/commit_1innodb.test''
- Replace per-thread signal()'s with SetUnhandledExceptionFilter().
The only remaining signal() is for SIGABRT (default abort()
handler in VS2005 is broken, i.e removes user exception filter)
- remove MessageBox()'es from error handling code
- Windows port for print_stacktrace() and write_core()
- Cleanup, removed some unused functions
sql/CMakeLists.txt:
Implement stack tracing on and generating crash dumps on Windows
sql/mysqld.cc:
Correct signal handling on Windows.
- For console events, like CTRL-C use SetConsoleCtrlHandler
- For exceptions like access violation, use SetUnhandledExceptionFilter
- For SIGABRT generate exception via __debugbreak() intrinsic
if built with VS2005 and later , since default SIGABRT handler
replaces unhandled exception filter specified by user
- make provisions to debug exception filter, as it is not trivial
(should be compiled with /DDEBUG_UNHANDLED_EXCEPTION_FILTER)
sql/sql_parse.cc:
Remove message box from windows signal handler.
The only thread specific handler left is for SIGABRT,
which is broken on VS2005 and later (user specified unhandled exception
filter gets overwritten)
sql/stacktrace.c:
Stack tracing and generating crash dumps on Windows
sql/stacktrace.h:
Implement print_stacktrace and write_core on Windows
into gbichot4.local:/home/mysql_src/mysql-5.1-build-gca
client/mysqltest.c:
Auto merged
include/my_sys.h:
Auto merged
mysys/thr_lock.c:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
into gbichot4.local:/home/mysql_src/mysql-maria-monty
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/replace.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysys/my_getopt.c:
Auto merged
mysys/thr_lock.c:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_search.c:
Auto merged
storage/myisam/mi_update.c:
Auto merged
storage/myisam/mi_write.c:
Auto merged
storage/myisam/myisamlog.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
include/my_global.h:
merge
storage/myisam/myisamdef.h:
merge
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
client/mysqldump.c:
my_bool for C
client/mysqltest.c:
my_bool for C
extra/replace.c:
my_bool for C
include/my_getopt.h:
my_bool for C
include/my_global.h:
Prevent people from using bool in C, it causes real bugs.
include/my_sys.h:
my_bool for C
include/my_time.h:
my_bool for C
include/thr_lock.h:
my_bool for C
libmysql/libmysql.c:
my_bool for C
mysys/charset.c:
my_bool for C
mysys/my_getopt.c:
my_bool for C
mysys/queues.c:
my_bool for C
mysys/thr_lock.c:
my_bool for C
regex/reginit.c:
my_bool for C
sql/set_var.cc:
C functions use my_bool so we must use my_bool too.
sql/sql_plugin.cc:
C functions use my_bool so we must use my_bool too.
This fixes a real observed bug of Maria, because on some Mac OS X,
sizeof(bool) is 1 in C and 4 in C++, so the bool* does wrong.
Removing useless line.
storage/heap/hp_update.c:
my_bool for C
storage/myisam/mi_check.c:
my_bool for C
storage/myisam/mi_dynrec.c:
my_bool for C
storage/myisam/mi_search.c:
my_bool for C
storage/myisam/mi_update.c:
my_bool for C
storage/myisam/mi_write.c:
my_bool for C
storage/myisam/myisamdef.h:
my_bool for C
storage/myisam/myisamlog.c:
my_bool for C
storage/myisam/myisampack.c:
my_bool for C
tests/mysql_client_test.c:
my_bool for C
unittest/mysys/bitmap-t.c:
my_bool for C
vio/viosslfactories.c:
my_bool for C
into quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
client/mysqlbinlog.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_class.cc:
Auto merged
into mysql.com:/home/hf/work/32942/my51-32942
mysql-test/r/select.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/sql_select.cc:
Auto merged
into kaamos.(none):/data/src/opt/mysql-5.1-opt
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
BitKeeper/deleted/.del-rpl_ndb_charset.result:
Auto merged
BitKeeper/deleted/.del-rpl_row_charset.result:
Auto merged
BitKeeper/deleted/.del-rpl_row_charset.test:
Auto merged
BitKeeper/deleted/.del-rpl_row_charset_innodb.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/lib/mtr_report.pl:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
Problem is not about intervals and doesn't actually cause 'full table scan'.
We have an optimization for DISTINCT when we have
'DISTINCT field_from_first_join_table' we don't need to read all the
rows from the JOIN-ed table if we found one conforming row.
It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
that case in the evaluate_join_record() and that doesn't break the
recordreading loop in sub_select().
Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.
mysql-test/r/select.result:
Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan".
test result
mysql-test/t/select.test:
Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
test case
sql/sql_select.cc:
Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from
this table anymore
into kaamos.(none):/data/src/opt/mysql-5.0-opt
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
include/my_base.h:
Manual merge between main 5.1 and team tree.