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.
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''
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
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.
- fix test failures that was already there but now are
more consistent when the 1 second sleep has been removed from
ndb_waiter
mysql-test/t/ndb_autodiscover.test:
Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/t/ndb_autodiscover3.test:
Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/include/ndb_wait_connected.inc:
Wait until mysqld has reconnected to ndbd after ndbd has been restarted
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.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.
The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.
mysql-test/t/subselect.test:
Corrected test case for the bug#31048.
mysql-test/r/subselect.result:
Corrected test case for the bug#31048.
into mysql.com:/home/bar/mysql-work/mysql-5.0.b32510v2
mysql-test/r/ctype_big5.result:
Auto merged
mysql-test/r/ctype_cp932.result:
Auto merged
mysql-test/r/ctype_euckr.result:
Auto merged
mysql-test/r/ctype_gb2312.result:
Auto merged
mysql-test/r/ctype_gbk.result:
Auto merged
mysql-test/r/ctype_uca.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_cp932.test:
Auto merged
mysql-test/t/ctype_uca.test:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
strings/ctype-ucs2.c:
Auto merged
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.
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.
when executed in version 5
Zero fill is a field attribute only. So we can't always
propagate constants for zerofill fields : the values and
expression results don't have that flag.
Fixed by converting the const value to a string and
using that in const propagation when the context allows it.
Disable const propagation for fields with ZEROFILL flag in
all the other cases.
mysql-test/r/compare.result:
Bug #31887: test case
mysql-test/t/compare.test:
Bug #31887: test case
sql/item.cc:
Bug #31887: If the context allows conversion
of an int constant to a zero-filled string constant
put the string constant instead of the int constant
when doing const propagation
sql/mysql_priv.h:
Bug #31887: a macro to get all the Field_num
descendant fields.
changes for an assert and an updated results file.
mysql-test/r/mix_innodb_myisam_binlog.result:
results file changed as there is no ROLLBACK query in binlog as it must be.
sql/sql_update.cc:
refining assert as the initial value of transactional_tables has been
changed to zero.
from storage engine
Federated may crash a server, return wrong result set, return
"ERROR 1030 (HY000): Got error 1430 from storage engine" message
when local (engine=federated) table has a key against nullable
column.
The problem was wrong implementation of function that creates
WHERE clause for remote query from key.
mysql-test/r/federated.result:
A test case for BUG#33946.
mysql-test/t/federated.test:
A test case for BUG#33946.
sql/ha_federated.cc:
Fixed that federated adds " IS NULL " condition to a remote query,
whereas "IS NOT NULL" requested by original query.
Fixed that federated didn't check for end of key buffer, didn't
setup key buffer pointer and remaining lenght of key buffer,
didn't add " AND " between conditions in case original query
has IS [NOT] NULL condition against nullable column.
Fixed that federated wrongly shifts key buffer pointer by extra
one byte when key part may be null (was: store_length + 1,
now: store_length).
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.
The get_sort function has been modified to ignore escaped
wildcards as usual.
mysql-test/r/grant3.result:
Added test case for bug#31194.
mysql-test/t/grant3.test:
Added test case for bug#31194.
sql/sql_acl.cc:
Fixed bug#31194.
The server used the wild_prefix escape character (usually \-character)
like % and _ wildcards in the get_sort function for sorting weights
calculation.
The get_sort function has been modified to ignore escaped wildcards
and alone escapes like in the wild_case_compare function.
type conversion.
Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.
mysql-test/r/select.result:
Added test case for bug#33764.
mysql-test/t/select.test:
Added test case for bug#33764.
sql/item_cmpfunc.cc:
Fixed bug#33764.
Copying of a pointer has been replaced with an optional copying of
a whole array to a newly allocated memory space in case of a
functional source item.
and
bug#33932 assertion at handle_slave_sql if init_slave_thread() fails
the asserts were caused by
bug33931: having thd deleted at time of executing err: code plus
a missed initialization;
bug33932: initialization of slave_is_running member was missed;
fixed with relocating mi members initialization and removing delete thd
It is safe to do as deletion happens later explicitly in the caller of
init_slave_thread().
Todo: at merging the test is better to be moved into suite/bugs for 5.x (when x>0).
sql/slave.cc:
adding the bugs simulating code;
relocating some assignments to satisfy the asserts;
mysql-test/r/rpl_bug33931.result:
the new result file
mysql-test/t/rpl_bug33931-slave.opt:
option to spark the simulation code
mysql-test/t/rpl_bug33931.test:
tests check that slave does not crash as before.
Slave threads must be in NO running state in the end.
or trigger crashes server
Under some circumstances a combination of VIEWs, subselects with outer
references and PS/SP/triggers could lead to use of uninitialized memory
and server crash as a result.
Fixed by changing the code in Item_field::fix_fields() so that in cases
when the field is a VIEW reference, we first check whether the field
is also an outer reference, and mark it appropriately before returning.
mysql-test/r/view.result:
Added a test case for bug #33389.
mysql-test/t/view.test:
Added a test case for bug #33389.
sql/item.cc:
In cases when in Item_field::fix_fields() from_field is a view reference,
do not return too early, i.e. before marking the reference as an outer
one when needed.
There was no instruction in the test that enforces the slave successfully connect
to the master.
The way the test was been written allowed the slave to had been late for rendezvous
so that about-connecting time queries to the master failed and are error-logged
to had been seen in Warnings of pb.
Fixed with adding a sychronization primitive to the test.
No test case is possible, observe error logs on pb.
Todo: revise need of rpl_report.pl's rules due to failing execution of
queries from get_master_verion_and_clock().
Any test should try to use a synchornization primitive like the current fix
makes and do not let the slave to miss successful connecting.
mysql-test/t/rpl_variables.test:
Completing the test's body with a synch macro to not let
the slave to miss the successful connecting to the master.
SET column storing procedure has been modified to be 64bit-clean.
mysql-test/r/type_set.result:
Added test case for bug#15409.
mysql-test/t/type_set.test:
Added test case for bug#15409.
sql/field.cc:
Fixed bug#15409.
The Field_set::store(longlong nr,...) method incompletely
calculates a bit mask for the comparison with a given number:
if that number is greater than 0x7F00 0000 0000 0000 (LONGLONG_MAX),
it uses zero bit mask instead of 0xFFFF FFFF FFFF FFFF (ULONGLONG_MAX).
Incomplete expression has been replaced with a set_bits macro call.
The unsignedness of large integer user variables was not being
properly preserved when feeded to prepared statements. This was
happening because the unsigned flags wasn't being updated when
converting the user variable is converted to a parameter.
The solution is to copy the unsigned flag when converting the
user variable to a parameter and take the unsigned flag into
account when converting the integer to a string.
mysql-test/r/binlog.result:
Add test case result for Bug#33798
mysql-test/r/ps.result:
Add test case result for Bug#33798
mysql-test/t/binlog.test:
Add test case for Bug#33798
mysql-test/t/ps.test:
Add test case for Bug#33798
sql/item.cc:
Take the unsigned flag into account when converting the
user variable.
The out of memory error was thrown when the sort buffer size were too small.
This led to a user confusion.
Now filesort throws the error message about sort buffer being too small.
mysql-test/t/order_by.test:
Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
mysql-test/r/order_by.result:
Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
sql/filesort.cc:
Bug#31590: Wrong error message on sort buffer being too small.
Now filesort throws the error message about sort buffer being too small
instead of out of memory error.
Minor post-fix for bug#34223.
mysql-test/r/innodb_mysql.result:
Minor post-fix for bug#34223.
mysql-test/r/variables.result:
Minor post-fix for bug#34223.
mysql-test/t/innodb_mysql.test:
Minor post-fix for bug#34223.
mysql-test/t/variables.test:
Minor post-fix for bug#34223.
and my_innodb_commit_concurrency global variables.
Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.
mysql-test/r/variables.result:
Added test case for bug#34223.
mysql-test/t/variables.test:
Added test case for bug#34223.
sql/mysqld.cc:
Fixed bug#34223.
Last update of the getopt_ull_limit_value function introduced
a sanity check for a variable type (only GET_UINT or GET_ULONG
are valid types).
However, my_innodb_autoextend_increment and
my_innodb_commit_concurrency are declared as GET_LONG.
Call stack is:
sys_var_long_ptr_global::update()
fix_unsigned()
getopt_ull_limit_value()
Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.
Server handles truncation for assignment of too-long values
into CHAR/VARCHAR/TEXT columns in a different ways when the
truncated characters are spaces:
1. CHAR(N) columns silently ignore end-space truncation;
2. TEXT columns post a truncation warning/error in the
non-strict/strict mode.
3. VARCHAR columns always post a truncation note in
any mode.
Space truncation processing has been synchronised over
CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
columns has been propagated as standard.
Binary-encoded string/BLOB columns are not affected.
mysql-test/r/heap.result:
Updated test case for bug#30059.
mysql-test/r/innodb.result:
Updated test case for bug#30059.
mysql-test/r/myisam.result:
Updated test case for bug#30059.
mysql-test/r/strict.result:
Updated test case for bug#30059.
mysql-test/r/type_binary.result:
Updated test case for bug#30059.
mysql-test/r/warnings.result:
Added test case for bug#30059.
mysql-test/t/warnings.test:
Added test case for bug#30059.
sql/field.cc:
Fixed bug#30059.
The report_data_too_long function was replaced with the
Field_longstr::report_if_important_data method.
The Field_string::store and the Field_blob::store
methods was synchronized with the Field_varstring::store
method.
Changes:
1. to CHAR(N): posting of space truncation note has been added
in both (strict and non-strict) modes;
2. to BLOBs: a check for space truncation has been added,
a warning in the non-strict mode and an error message in
the strict mode have been replaced with a truncation note.
Similar parts of Field_string::store, Field_blob::store and
Field_varstring::store have been moved to the
Field_longstr::report_if_important_data method.
sql/field.h:
Fixed bug#30059.
The Field_longstr::report_if_important_data method has been declared.
does not use trans tables
There had been two issues.
Rollback statement was recorded in binlog even though a multi-update
had not modified any non-transactional table.
The reason for this artifact was a false initial value of multi_update::transactional_tables.
Yet another artifact that explained on the bug page is that
`ha_autocommit_or_rollback' works differently depending on whether
a transaction engine has been compiled in.
Fixed: with setting multi_update::transactional_tables to zero at initialization
time. Multi-update on non-trans table won't cause ROLLBACK in binlog with
either compilation option.
The 2nd mentioned artifact comprises a self-standing issue (to be reported
separately).
mysql-test/r/multi_update.result:
results changed - there is no ROLLBACK in binlog anymore as it should be
sql/sql_update.cc:
A wrong assumption on that there were modified transactional table,
which is nonsense at the very beginning of the query execution.
Problem: some collation handlers called incorrect version
of my_like_range_xxx(), which led to wrong min_str and max_str,
so like range optimizer threw away good records.
Fix: changing the wrong handlers to call proper version of
my_like_range_xxx().
mysql-test/r/ctype_big5.result:
Adding test
mysql-test/r/ctype_cp932.result:
Adding test
mysql-test/r/ctype_eucjpms.result:
Adding test
mysql-test/r/ctype_euckr.result:
Adding test
mysql-test/r/ctype_gb2312.result:
Adding test
mysql-test/r/ctype_gbk.result:
Adding test
mysql-test/r/ctype_sjis.result:
Adding test
mysql-test/r/ctype_uca.result:
Adding test
mysql-test/r/ctype_ucs.result:
Adding test
mysql-test/r/ctype_ujis.result:
Adding test
mysql-test/t/ctype_big5.test:
Adding test
mysql-test/t/ctype_cp932.test:
Adding test
mysql-test/t/ctype_eucjpms.test:
Adding test
mysql-test/t/ctype_euckr.test:
Adding test
mysql-test/t/ctype_gb2312.test:
Adding test
mysql-test/t/ctype_gbk.test:
Adding test
mysql-test/t/ctype_sjis.test:
Adding test
mysql-test/t/ctype_uca.test:
Adding test
mysql-test/t/ctype_ucs.test:
Adding test
mysql-test/t/ctype_ujis.test:
Adding test
strings/ctype-euc_kr.c:
Changing like_range function
strings/ctype-eucjpms.c:
Changing like_range function
strings/ctype-gb2312.c:
Changing like_range function
strings/ctype-ucs2.c:
Changing like_range function
strings/ctype-ujis.c:
Changing like_range function
mysql-test/include/ctype_like_range_f1f2.inc:
New BitKeeper file ``mysql-test/include/ctype_like_range_f1f2.inc''
mysql-test/r/mysqlbinlog.result:
Result file change.
mysql-test/t/mysqlbinlog.test:
Fixing test to not be dependent on the sequence numbers
for file names generated by mysqlbinlog.
When issuing a column level grant on a table which require pre-locking the
server crashed.
The reason behind the crash was that data structures used by the lock api
wasn't properly reinitialized in the case of a column level grant.
mysql-test/r/grant.result:
* Added test case
mysql-test/t/grant.test:
* Added test case
sql/sql_acl.cc:
* The lock api is dending on the thd->lex object and this variable needs to
be re-initialized when opened with a new set of tables than specified in the
original statement.
mysql-test/r/mix_innodb_myisam_binlog.result:
Result change
mysql-test/t/binlog_start_comment.test:
Adding --local-load to mysqlbinlog to prevent it from failing
on Windows. Also adding --short-form.
mysql-test/t/mix_innodb_myisam_binlog.test:
Extending LIKE pattern to use either \n or \r\n in order to work
on Windows.
on table creates
The problem was in incompatible syntax for key definition in CREATE
TABLE.
5.0 supports only the following syntax for key definition (see "CREATE
TABLE syntax" in the manual):
{INDEX|KEY} [index_name] [index_type] (index_col_name,...)
While 5.1 parser supports the above syntax, the "preferred" syntax was
changed to:
{INDEX|KEY} [index_name] (index_col_name,...) [index_type]
The above syntax is used in 5.1 for the SHOW CREATE TABLE output, which
led to dumps generated by 5.1 being incompatible with 5.0.
Fixed by changing the parser in 5.0 to support both 5.0 and 5.1 syntax
for key definition.
mysql-test/r/create.result:
Added a test case for bug #25162.
mysql-test/t/create.test:
Added a test case for bug #25162.
sql/sql_yacc.yy:
Changed the parser to support both 5.0 and 5.1 syntax for index type
specification in CREATE TABLE.
Simple subselects are pulled into upper selects. This operation substitutes the
pulled subselect for the first item from the select list of the subselect.
If an alias is defined for a subselect it is inherited by the replacement item.
As this is done after fix_fields phase this alias isn't showed if the
replacement item is a stored function. This happens because the Item_func_sp::make_field
function makes send field from its result_field and ignores the defined alias.
Now when an alias is defined the Item_func_sp::make_field function sets it for
the returned field.
mysql-test/t/sp.test:
Added a test case for the bug#30787: Stored function ignores user defined alias.
mysql-test/r/sp.result:
Added a test case for the bug#30787: Stored function ignores user defined alias.
sql/item_func.cc:
Bug#30787: Stored function ignores user defined alias.
Now when an alias is defined the Item_func_sp::make_field function sets it for
the returned field.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
include/my_sys.h:
Auto merged
sql/log.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/ndb_condition_pushdown.result:
bug#34107 lower scanfilter max size to not hit TUP limit
mysql-test/t/ndb_condition_pushdown.test:
bug#34107 lower scanfilter max size to not hit TUP limit
ndb/include/ndbapi/ndbapi_limits.h:
bug#34107 lower scanfilter max size to not hit TUP limit
mysql-test/include/have_local_infile.inc:
BitKeeper file /data0/mkindahl/mysql-5.0-rpl-merge/mysql-test/include/have_local_infile.inc
mysql-test/r/have_local_infile.require:
BitKeeper file /data0/mkindahl/mysql-5.0-rpl-merge/mysql-test/r/have_local_infile.require
mysql-test/t/binlog_start_comment.test:
Test requires that local_infile is on, so added require for that.
mysql-test/t/rpl_sp.test:
Adding missing sync_slave_with_master causing following tests to fail.
mysql-test/r/bdb_notembedded.result:
Result change.
mysql-test/r/rpl_loaddata_map.result:
Result change.
mysql-test/t/rpl_loaddata_map.test:
Blanking out file id as well.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
include/my_sys.h:
Auto merged
mysql-test/r/blackhole.result:
Auto merged
mysql-test/r/case.result:
Auto merged
mysql-test/r/mysqlbinlog2.result:
Auto merged
mysql-test/t/blackhole.test:
Auto merged
mysql-test/t/case.test:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
and so that it works correctly on Windows.
mysql-test/r/mysqlcheck.result:
Flush tables before monkeying around with underlying MyISAM data files
mysql-test/t/mysqlcheck.test:
Fix the test case for bug #25347 so that it actually does test the behavior.
Also, this makes it work on Windows by ensuring that mysqld doesn't hold the
underlying MyISAM files open while we try to corrupt them on disk.
Flush tables before monkeying around with underlying MyISAM data files;
--use-frm, so that mysqlcheck will succeed.
mysql-test/r/ndb_bug31477.result:
BitKeeper file /export/space/pekka/ndb/version/my50-bug31477/mysql-test/r/ndb_bug31477.result
mysql-test/t/ndb_bug31477.test:
BitKeeper file /export/space/pekka/ndb/version/my50-bug31477/mysql-test/t/ndb_bug31477.test
ndb/src/common/util/NdbOut.cpp:
missing comma, causing weird Uint64 printout
ndb/test/ndbapi/testOIBasic.cpp:
adjust params
ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
bug#31477 - explicit rewrite of tuxQueryTh
if active op then non-dirty scan enters lock queue via TUX
instead of skipping the tuple
ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp:
bug#31477 - explicit rewrite of tuxQueryTh
if active op then non-dirty scan enters lock queue via TUX
instead of skipping the tuple
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
bug#31477 - explicit rewrite of tuxQueryTh
if active op then non-dirty scan enters lock queue via TUX
instead of skipping the tuple
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a
result ref access was used instead of range access and wrong result sets were
returned in many cases.
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.
mysql-test/r/range.result:
Added a test case for bug #33833.
mysql-test/t/range.test:
Added a test case for bug #33833.
sql/item.cc:
Fixed bug #33833.
Added the method eq_by_collation that compares two items almost as
the method Item::eq, but it rather enforces a given collation for
the comparison.
sql/item.h:
Fixed bug #33833.
Added the method eq_by_collation that compares two items almost as
the method Item::eq, but it rather enforces a given collation for
the comparison.
The problem is when create/rename/drop users, the statement was logged regardless of error, even if no data has been changed, the statement was logged.
After this patch, create/rename/drop users don't write the binlog if the statement makes no changes, if the statement does make any changes, log the statement with possible error code.
This patch is based on the patch for BUG#29749, which is not pushed
sql/sql_acl.cc:
when create/rename/drop users, don't write the binlog if the statement make no changes
mysql-test/r/rpl_user.result:
New BitKeeper file ``mysql-test/r/rpl_user.result''
mysql-test/t/rpl_user.test:
New BitKeeper file ``mysql-test/t/rpl_user.test''
into lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-33618
mysql-test/t/sp.test:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)
The server used to crash when REPEAT or another control instruction
was used in conjunction with labels and a LEAVE instruction.
The crash was caused by a missing "pop" of handlers or cursors in the
code representing the stored program. When executing the code in a loop,
this missing "pop" would result in a stack overflow, corrupting memory.
Code generation has been fixed to produce the missing h_pop/c_pop
instructions.
Also, the logic checking that labels at the beginning and the end of a
statement are matched was incorrect, causing Bug 33983.
End labels, when used, must match the label used at the beginning of a block.
mysql-test/r/sp-code.result:
Bug#33618 (Crash in sp_rcontext)
mysql-test/r/sp-error.result:
Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)
mysql-test/r/sp.result:
Bug#33618 (Crash in sp_rcontext)
mysql-test/t/sp-code.test:
Bug#33618 (Crash in sp_rcontext)
mysql-test/t/sp-error.test:
Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)
mysql-test/t/sp.test:
Bug#33618 (Crash in sp_rcontext)
sql/sp_head.cc:
Bug#33618 (Crash in sp_rcontext)
sql/sp_head.h:
Bug#33618 (Crash in sp_rcontext)
sql/sp_rcontext.cc:
Bug#33618 (Crash in sp_rcontext)
sql/sp_rcontext.h:
Bug#33618 (Crash in sp_rcontext)
sql/sql_yacc.yy:
Bug#33618 (Crash in sp_rcontext)
Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
mysqlcheck tests nullness of the engine type to know whether the
"table" is a view or not. That also falsely catches tables that
are severly damaged.
Instead, use SHOW FULL TABLES to test whether a "table" is a view
or not.
(Don't add new function. Instead, get original data a smarter way.)
Make it safe for use against databases before when views appeared.
client/mysqlcheck.c:
Use SHOW FULL TABLES to test better whether a name in the table
list is one of a view. Checking that the engine is NULL is
insufficient.
Implemented suggestion from jimw that involved removing most of
original patch and getting data a better way
mysql-test/r/mysqlcheck.result:
Verify that tables that have NULL/unreadable engine types are
processed and not interpreted as views.
mysql-test/t/mysqlcheck.test:
Verify that tables that have NULL/unreadable engine types are
processed and not interpreted as views.
Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node
ndb_restore.result, ndb_restore.test:
Changed test to use information_schema to check auto_increment
DictCache.cpp, Ndb.cpp:
Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node. When setting the auto_increment value we'll also read up the new value, this is useful if we use the table the first time in this MySQL Server and haven't yet seen the NEXTID value. The kernel will avoid updating since it already has the value but will also read up the NEXTID value to ensure we don't need to do this any more time.
ndb_auto_increment.result:
Updated result file since it was incorrect
ndb/include/ndbapi/Ndb.hpp:
Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node
ndb/src/ndbapi/DictCache.hpp:
Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node
ndb/src/ndbapi/DictCache.cpp:
Add new variable m_highest_seen when only peeking at auto_increment NEXTID
and not retrieving to cache. Add new method to check tupleId before calling
data node. When setting the auto_increment value we'll also read up the new
value, this is useful if we use the table the first time in this MySQL Server
and haven't yet seen the NEXTID value. The kernel will avoid updating since it
already has the value but will also read up the NEXTID value to ensure we
don't need to do this any more time.
ndb/src/ndbapi/Ndb.cpp:
Add new variable m_highest_seen when only peeking at auto_increment NEXTID
and not retrieving to cache. Add new method to check tupleId before calling
data node. When setting the auto_increment value we'll also read up the new
value, this is useful if we use the table the first time in this MySQL Server
and haven't yet seen the NEXTID value. The kernel will avoid updating since
it already has the value but will also read up the NEXTID value to ensure we
don't need to do this any more time.
mysql-test/r/ndb_restore.result:
Changed test to use information_schema to check auto_increment
mysql-test/t/ndb_restore.test:
Changed test to use information_schema to check auto_increment
mysql-test/r/ndb_auto_increment.result:
Updated result file since it was incorrect
The problem occurred when one had a subquery that had an equality X=Y where
Y referred to a named select list expression from the parent select. MySQL
crashed when trying to use the X=Y equality for ref-based access.
Fixed by allowing non-Item_field items in the described case.
mysql-test/r/subselect.result:
BUG#33794 "MySQL crashes executing specific query"
- Testcase
mysql-test/t/subselect.test:
BUG#33794 "MySQL crashes executing specific query"
- Testcase
sql/sql_select.cc:
BUG#33794 "MySQL crashes executing specific query"
get_store_key() assumed that if it got a reference
t.key=Item_outer_ref(Item_direct_ref(x))
then x was an Item_field object, which is not the case when one refers to a
named select list expression out ot subquery.
into stella.local:/home2/mydev/mysql-5.0-axmrg
mysql-test/r/myisam.result:
Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Manual merge
mysql-test/t/myisam.test:
Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Manual merge
at page 1024 with ucs2_bin
Post-pushbuild fix.
Moved test from myisam.test to ctype_ucs2_def.test.
UCS2 is not always available.
mysql-test/r/ctype_ucs2_def.result:
Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Moved test result from myisam.result to here.
mysql-test/r/myisam.result:
Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Moved test result from here to ctype_ucs2_def.result.
mysql-test/t/ctype_ucs2_def.test:
Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Moved test from myisam.test to here.
UCS2 is not always available.
mysql-test/t/myisam.test:
Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Moved test from here to ctype_ucs2_def.test.
UCS2 is not always available.
The ROUND(X, D) function would change the Item::decimals field during
execution to achieve the effect of a dynamic number of decimal digits.
This caused a series of bugs:
Bug #30617:Round() function not working under some circumstances in InnoDB
Bug #33402:ROUND with decimal and non-constant cannot round to 0 decimal places
Bug #30889:filesort and order by with float/numeric crashes server
Fixed by never changing the number of shown digits for DECIMAL when
used with a nonconstant number of decimal digits.
mysql-test/r/type_decimal.result:
Bug#33143: Test result
mysql-test/t/type_decimal.test:
Bug#33143: Test case
sql/item_func.cc:
Bug#33143:
- Moved the DECIMAL_MAX_SCALE limitation to fix_length_and_dec.
- Removed resetting of Item::decimals field.
- set the frac field of the output value to current scale.
strings/decimal.c:
Bug#33143: It is necessary to set all digits in the buffer following the
rounded one to zero, as they may now be displayed.
The name resolution for correlated subqueries and HAVING clauses
failed to distinguish which of two was being performed when there
was a reference to an outer aliased field.
Fixed by adding the condition that HAVING clause name resulotion
is being performed.
mysql-test/r/group_by.result:
Bug#31797: Test result
mysql-test/t/group_by.test:
Bug#31797: Test case
sql/item.cc:
Bug#31797:
Corrected function comment.
The fix, raising the error is restricted to HAVING name resolution.
value when inserting into a view.
The mysql_prepare_insert function checks all fields of the target table that
directly or indirectly (through a view) are specified in the INSERT
statement to have a default value. This check can be skipped if the INSERT
statement doesn't mention any insert fields. In case of a view this allows
fields that aren't mentioned in the view to bypass the check.
Now fields of the target table are always checked to have a default value
when insert goes into a view.
mysql-test/t/view.test:
Added a test case for the bug#29477: Not all fields of the target table were
checked to have a default value when inserting into a view.
mysql-test/r/view.result:
Added a test case for the bug#29477: Not all fields of the target table were
checked to have a default value when inserting into a view.
sql/sql_insert.cc:
Bug#29477: Not all fields of the target table were checked to have a default
value when inserting into a view.
Now fields of the target table are always checked to have a default value
when insert goes into a view.
When resolving references we need to take into consideration
the view "fields" and allow qualified access to them.
Fixed by extending the reference resolution to process view
fields correctly.
mysql-test/r/func_group.result:
Bug #33133: test case
mysql-test/t/func_group.test:
Bug #33133: test case
sql/sql_base.cc:
Bug #33133: allow qualified alias refs to view fields
the result should be added by 1 by the year(now()) function.
mysql-test/r/view.result:
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
the above statement in test file has a year(now()) function,
the result should increase by 1 from 2007 year to 2008 year.
server crash.
The filesort implementation has an optimization for subquery execution which
consists of reusing previously allocated buffers. In particular the call to
the read_buffpek_from_file function might be skipped when a big enough buffer
for buffer descriptors (buffpeks) is already allocated. Beside allocating
memory for buffpeks this function fills allocated buffer with data read from
disk. Skipping it might led to using an arbitrary memory as fields' data and
finally to a crash.
Now the read_buffpek_from_file function is always called. It allocates
new buffer only when necessary, but always fill it with correct data.
sql/filesort.cc:
Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
server crash.Now the read_buffpek_from_file function is always called. It allocates
new buffer only when necessary, but always fill it with correct data.
mysql-test/r/subselect.result:
Added a test case for the bug#33675: Usage of an uninitialized memory by
filesort in a subquery caused server crash.
mysql-test/t/subselect.test:
Added a test case for the bug#33675: Usage of an uninitialized memory by
filesort in a subquery caused server crash.
mysql-test/r/blackhole.result:
Result change.
mysql-test/r/mysqlbinlog2.result:
Result change.
mysql-test/t/blackhole.test:
Fixing test to ignore file_id for exec_load_file events.
into magare.gmz:/home/kgeorge/mysql/autopush/B33256-5.0-opt
sql/field.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
mysql-test/r/binlog_start_comment.result:
Drop tables used in the test case when done
mysql-test/r/blackhole.result:
Mask out file_id in show binlog events output
mysql-test/r/case.result:
Drop table t2 too if it exists at the start of the test
mysql-test/t/blackhole.test:
Mask out file_id in show binlog events output
mysql-test/t/case.test:
Drop table t2 too if it exists at the start of the test
to be compiled in
The problem was that on a statically built server an attempt to create
a UDF resulted in a different, but reasonable error ("Can't open shared
library" instead of "UDFs are unavailable with the --skip-grant-tables
option"), which caused a failure for the test case for bug #32020.
Fixed by moving the test case for bug #32020 from skip_grants.test to a
separate test to ensure that it is only run when the server is built
with support for dynamically loaded libraries.
mysql-test/r/skip_grants.result:
Moved the test case for bug #32020 to a separate test.
mysql-test/t/skip_grants.test:
Moved the test case for bug #32020 to a separate test.
mysql-test/r/udf_skip_grants.result:
Moved the test case for bug #32020 to a separate test.
mysql-test/t/udf_skip_grants-master.opt:
Moved the test case for bug #32020 to a separate test.
mysql-test/t/udf_skip_grants.test:
Moved the test case for bug #32020 to a separate test.
changes due to non-determinism in value of read_buffer_size.
mysql-test/r/rpl_loaddata_map.result:
results changed
mysql-test/t/rpl_loaddata_map.test:
showing only the fact that the buffer size is larger than the packet size.
mysql-test/std_data/bug30435_10k_items.txt:
data for bug#30435 regression testing
mysql-test/std_data/bug30435_5k.txt:
data for bug#30435 regression testing
read_buffer_size set on master
BUG#33413 show binlog events fails if binlog has event size of close
to max_allowed_packet
The size of Append_block replication event was determined solely by
read_buffer_size whereas the rest of replication code deals with
max_allowed_packet.
When the former parameter was set to larger than the latter there were
two artifacts: the master could not read events from binlog;
show master events did not show.
Fixed with
- fragmenting the used io-cached buffer into pieces each size of less
than max_allowed_packet (bug#30435)
- incrementing show-binlog-events handling thread's max_allowed_packet
with the max estimated for the replication header size
include/my_sys.h:
accessor-macros added in order not to mess with the io cache's implementation
details in code that merely exploits the io-cache.
sql/sql_repl.cc:
BUG#33413: incrementing thd->variables.max_allowed_packet with
the max estimation for the replication header size (from bug#19402);
refactoring log_loaded_block() to fragment the io_cache buffer in case
read_buffer_size > max_allowed_packet.
mysql-test/r/rpl_loaddata_map.result:
New BitKeeper file ``mysql-test/r/rpl_loaddata_map.result''
mysql-test/t/rpl_loaddata_map-master.opt:
specific options to trigger BUG#30435, BUG#33413 situations
mysql-test/t/rpl_loaddata_map-slave.opt:
max_allowed_packet to be compatible with the master's version.
mysql-test/t/rpl_loaddata_map.test:
regression tests for two bugs.
Now, every transaction (including autocommit transactions) start with
a BEGIN and end with a COMMIT/ROLLBACK in the binlog.
Added a test case, and updated lots of test case result files.
mysql-test/t/rpl_transaction-master.opt:
BitKeeper file /home/sven/bk/b26395-autocommit-xa/5.0-rpl/mysql-test/t/rpl_transaction-master.opt
mysql-test/t/rpl_transaction-slave.opt:
BitKeeper file /home/sven/bk/b26395-autocommit-xa/5.0-rpl/mysql-test/t/rpl_transaction-slave.opt
mysql-test/r/mix_innodb_myisam_binlog.result:
Updated result file
mysql-test/r/multi_update.result:
Updated result file
mysql-test/r/rpl_transaction.result:
New result file for new test case.
mysql-test/r/sp_trans_log.result:
Updated result file
mysql-test/r/variables-big.result:
Updated result file
mysql-test/t/rpl_transaction.test:
New test case.
sql/log.cc:
- Always write BEGIN and COMMIT around statements, even in autocommit
mode.
- Added comments for binlog_commit and binlog_rollback.
sql/log_event.cc:
Added debug trigger to avoid writing xid events to the binlog.
w/ Field_date instead of Field_newdate
Field_date was still used in temp table creation.
Fixed by using Field_newdate consistently throughout the server
except when reading tables defined with older MySQL version.
No test suite is possible because both Field_date and Field_newdate
return the same values in all the metadata calls.
mysql-test/r/type_decimal.result:
Bug #33256: removed redundant warnings
sql/field.h:
Bug #33256: Add a constructor similar to Field_date::Field_date()
sql/item.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_sum.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_timefunc.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_timefunc.h:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
When set the server-id dynamically, the server_id member of current thread is not updated.
Update the server_id member of current thread after updated the global variable value.
sql/set_var.cc:
Update server_id of current thread
mysql-test/r/rpl_server_id.result:
Add test for BUG#28908
mysql-test/t/rpl_server_id.test:
Add test for BUG#28908
Complementary patch since LOAD DATA INFILE was not covered in
the previous patch.
This patch adds a check so that the slave skip counter is not
decreased to zero if seeing a BEGIN_LOAD_QUERY_EVENT,
APPEND_BLOCK_EVENT, or CREATE_FILE_EVENT since these cannot
end a group. The group is terminated by an EXECUTE_LOAD_QUERY_
EVENT or DELETE_FILE_EVENT.
mysql-test/r/rpl_slave_skip.result:
Result change.
mysql-test/t/rpl_slave_skip.test:
Adding tests to test that the first event of a LOAD DATA INFILE
can be skipped safely for both transactional and non-transactional
tables. Also include a case that will generate a DELETE_FILE event
last in the group, and this should be properly skipped as well.
sql/slave.cc:
Not decrementing slave skip counter to zero when seeing a
BEGIN_LOAD_QUERY_EVENT, APPEND_BLOCK_EVENT, or CREATE_FILE_EVENT
since these cannot end a group.
into mysql.com:/misc/mysql/31990/50-31990
mysql-test/r/cast.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
mysql-test/t/type_date.test:
manual merge
bug#33382
mysql-test/r/variables.result:
typo in a test case
mysql-test/t/variables.test:
typo in a test case
sql/set_var.cc:
correct invalid values in SET GLOBAL var=DEFAULT
into linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/union.result:
Bug#32848: Manual merge
mysql-test/t/union.test:
Bug#32848: Manual merge