Bug#35161
Fixed memory leak when failing to open a partition.
Bug#20129
Added tests for verifying REPAIR PARTITION.
mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test
Created by:
CREATE TABLE t1_will_crash (
a VARCHAR(255),
b INT,
c LONGTEXT,
PRIMARY KEY (a, b))ENGINE=MyISAM
PARTITION BY HASH (b)
PARTITIONS 7;
INSERT INTO t1_will_crash VALUES ...
and then
head -c 1024 var/master-data/test/t1_will_crash#P#p1.MYD
into this file.
mysql-test/std_data/parts/t1_will_crash#P#p2.MYD:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after _mi_mark_file_changed in mi_write
was done.
mysql-test/std_data/parts/t1_will_crash#P#p2.MYI:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after _mi_mark_file_changed in mi_write
was done.
mysql-test/std_data/parts/t1_will_crash#P#p3.MYI:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after *share->write_record was done.
mysql-test/std_data/parts/t1_will_crash#P#p4.MYI:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after flush_cached_blocks
mysql-test/std_data/parts/t1_will_crash#P#p6.MYD:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after _mi_write_part_record in
write_dynamic_record returned for the first time.
mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after _mi_write_part_record in
write_dynamic_record returned for the second time.
mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
(see mysql-test/suite/parts/t/partition_repair_myisam.test)
copy of file right after _mi_write_part_record in
write_dynamic_record returned for the third time.
(data file fully updated).
mysql-test/suite/parts/r/partition_recover_myisam.result:
Bug#35161
Renamed since it was a test of recover
and to make repair free for use without
--myisam-recover
mysql-test/suite/parts/r/partition_repair_myisam.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
New result file for testing CHECK/REPAIR of partitioned tables
mysql-test/suite/parts/t/partition_recover_myisam-master.opt:
Bug#35161
Renamed since it was a test of recover
and to make repair free for use without
--myisam-recover
mysql-test/suite/parts/t/partition_recover_myisam.test:
Bug#35161
Renamed since it was a test of recover
and to make repair free for use without
--myisam-recover
mysql-test/suite/parts/t/partition_repair_myisam.test:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
New test file for testing CHECK/REPAIR of partitioned tables
sql/ha_partition.cc:
Bug#35161
Fix of memory leak when open of partition failed.
If [NOT] PRESERVE was not given, parser always defaulted to NOT
PRESERVE, making it impossible for the "not given = no change"
rule to work in ALTER EVENT. Leaving out the PRESERVE-clause
defaults to NOT PRESERVE on CREATE now, and to "no change" in
ALTER.
mysql-test/r/events_2.result:
show that giving no PRESERVE-clause to ALTER EVENT
results in no change. show that giving no PRESERVE-clause
to CREATE EVENT defaults to NOT PRESERVE as per the docs.
Show specifically that this is also handled correctly when
trying to ALTER EVENTs into the past.
mysql-test/t/events_2.test:
show that giving no PRESERVE-clause to ALTER EVENT
results in no change. show that giving no PRESERVE-clause
to CREATE EVENT defaults to NOT PRESERVE as per the docs.
Show specifically that this is also handled correctly when
trying to ALTER EVENTs into the past.
sql/event_db_repository.cc:
If ALTER EVENT was given no PRESERVE-clause (meaning "no change"),
we don't know the previous PRESERVE-setting by the time we check
the parse-data. If ALTER EVENT was given dates that are in the past,
we don't know how to react, lacking the PRESERVE-setting. Heal this
by running the check later when we have actually read the previous
EVENT-data.
sql/event_parse_data.cc:
Change default for ON COMPLETION to indicate, "not specified."
Also defer throwing errors when ALTER EVENT is given dates in
the past but not PRESERVE-clause until we know the previous
PRESERVE-value.
sql/event_parse_data.h:
Add third state for ON COMPLETION [NOT] PRESERVE (preserve,
don't, not specified).
Make check_dates() public so we can defer this check until
deeper in the callstack where we have all the required data.
sql/sql_yacc.yy:
If CREATE EVENT is not given ON COMPLETION [NOT] PRESERVE,
we default to NOT, as per the docs.
Length value is the length of the field,
Max_length is the length of the field value.
So Max_length can not be more than Length.
The fix: fixed calculation of the Item_empty_string item length
(Patch applied and queued on demand of Trudy/Davi.)
sql/item.h:
fixed calculation of the item length
sql/sql_show.cc:
removed unnecessary code
When the fractional part in a multiplication of DECIMALs
overflowed, we truncated the first operand rather than the
longest. Now truncating least significant places instead
for more precise multiplications.
(Queuing at demand of Trudy/Davi.)
mysql-test/r/type_newdecimal.result:
show that if we need to truncate the scale of an operand, we pick the
right one (that is, we discard the least significant decimal places)
mysql-test/t/type_newdecimal.test:
show that if we need to truncate the scale of an operand, we pick the
right one (that is, we discard the least significant decimal places)
strings/decimal.c:
when needing to disregard fractional parts, pick the least
significant ones
Due to unknown changes the test failed in some ways.
Fixed by checking the test case in detail, commenting the expected behavior,
and fixing error directives.
In the course of the analyze unneeded get_lock()/release_lock() use,
unneeded send/reap use, and unneeded sleeps were removed. The lock wait
timeout was reduced to 1 second, so that this is no big-test any more.
The test was split into two parts, one running the tests with
--innodb_locks_unsafe_for_binlog, the other part without.
The main part (include/concurrent.inc) conditionally expects
lock wait timeouts based on the value of the system variable
innodb_locks_unsafe_for_binlog.
The major part of the patch comes from Kristofer Pettersson.
(Chad queues this patch on demand by Trudy/Davi.)
update accross partitions.
It's not Innodb-specific bug.
ha_partition::update_row() didn't set
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET when
orig_timestamp_type == TIMESTAMP_AUTO_SET_ON_INSERT.
So that a partition sets the timestamp field when a record
is moved to a different partition.
Fixed by doing '= TIMESTAMP_NO_AUTO_SET' unconditionally.
Also ha_partition::write_row() is fixed in same way as now
Field_timestamp::set() is called twice in SET_ON_INSERT case.
(Chad queues this patch on demand by Trudy/Davi.)
mysql-test/r/partition.result:
Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
test result
mysql-test/t/partition.test:
Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
test case
sql/ha_partition.cc:
Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
Do table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET unconditionally
in ha_partition::update_row and ::write_row()
The problem:
CSV storage engine open function returns success even
thought it failed to open the data file
The fix:
return error
Additional fixes:
added MY_WME to my_open to avoid mysterious error message
free share struct if open the file was unsuccessful
mysql-test/r/csv.result:
test result
mysql-test/t/csv.test:
test case
storage/csv/ha_tina.cc:
The problem:
CSV storage engine open function returns success even
thought it failed to open the data file
The fix:
return error
Additional fixes:
added MY_WME to my_open to avoid mysterious error message
free share struct if open the file was unsuccessful
with blobs containing nulls
Problem: FEDERATED SE improperly stores NULL fields in the record buffer.
Fix: store them properly.
mysql-test/r/federated.result:
Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls
- test result.
mysql-test/t/federated.test:
Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls
- test case.
sql/ha_federated.cc:
Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls
- storing a NULL field in the record buffer
we must initialize its data as other code
may rely on it.
Problem: REGEXP in functions/PSs may return wrong results
due to improper initialization.
Fix: initialize required REGEXP params.
sql/item_cmpfunc.cc:
Fix for bug#37337: Function returns different results
prev_regexp is used in the Item_func_regex::regcomp()
to store previous regex and to avoid re-initialization
if given the same pattern.
Shoud be deleted in the Item_func_regex::cleanup() where we
clean up the regexp structure.
Details:
- add subtest with drop unrelated view
- rearrange existing tests so that a distinction
between drop procedure and drop function effects
is possible
used causes server crash.
When the loose index scan access method is used values of aggregated functions
are precomputed by it. Aggregation of such functions shouldn't be performed
in this case and functions should be treated as normal ones.
The create_tmp_table function wasn't taking this into account and this led to
a crash if a query has MIN/MAX aggregate functions and employs temporary table
and loose index scan.
Now the JOIN::exec and the create_tmp_table functions treat MIN/MAX aggregate
functions as normal ones when the loose index scan is used.
mysql-test/r/group_min_max.result:
Added a test case for the bug#38195.
mysql-test/t/group_min_max.test:
Added a test case for the bug#38195.
sql/sql_select.cc:
Bug#38195: Incorrect handling of aggregate functions when loose index scan is
used causes server crash.
Now the JOIN::exec and the create_tmp_table functions treat MIN/MAX aggregate
functions as normal ones when the loose index scan is used.
partition is corrupt
Updated result files after merge
mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated result file after merge
mysql-test/suite/parts/t/disabled.def:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Enabled two tests after fixing the bug.
partition is corrupt
The main problem was that ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR
PARTITION took another code path (over mysql_alter_table instead of
mysql_admin_table) which differs in two ways:
1) alter table opens the tables in a different way than admin tables do
resulting in returning with error before it tried the command
2) alter table does not start to send any diagnostic rows to the client
which the lower admin functions continue to use -> resulting in
assertion crash
The fix:
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use
the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE t.
Adding check in mysql_admin_table to setup the partition list for
which partitions that should be used.
Partitioned tables will still not work with
REPAIR TABLE/PARTITION USE_FRM, since that requires moving partitions
to tables, REPAIR TABLE t USE_FRM, and check that the data still
fulfills the partitioning function and then move the table back to
being a partition.
NOTE: I have removed the following functions from the handler
interface:
analyze_partitions, check_partitions, optimize_partitions,
repair_partitions
Since they are not longer needed.
THIS ALTERS THE STORAGE ENGINE API
mysql-test/r/handler_innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/r/innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/r/innodb_mysql.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/r/partition.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/r/trigger-trans.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/suite/ndb/r/ndb_partition_key.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/ndb/t/ndb_partition_key.test:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/parts/inc/partition_alter4.inc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/parts/r/partition_alter4_innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/parts/r/partition_alter4_myisam.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/rpl/r/rpl_failed_optimize.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/t/partition.test:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
sql/ha_partition.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a function for returning admin commands result rows
Updated handle_opt_partitions to handle admin commands result rows,
and some error filtering (as mysql_admin_table do).
Removed the functions analyze/check/optimize/repair_partitions
since they have no longer any use.
sql/ha_partition.h:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Removed analyze/check/optimize/repair_partitions since they
are no longer are needed.
sql/handler.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Removed analyze/check/optimize/repair_partitions since they
are no longer are needed.
sql/handler.h:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Removed analyze/check/optimize/repair_partitions since they
are no longer are needed.
sql/mysql_priv.h:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added set_part_state for reuse of code in mysql_admin_table.
(Originally fond in sql/sql_partition.cc:prep_alter_part_table)
sql/protocol.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added one assert and a debug print.
sql/sql_partition.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Refactored code for setting up partition state, set_part_state,
now used in both prep_alter_part_table and
sql_table.cc:mysql_admin_table.
Removed code for handling ANALYZE/CHECK/OPTIMIZE/REPAIR partitions,
since it is now handled by mysql_admin_table.
sql/sql_table.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added functionality in mysql_admin_table to work with partitioned
tables.
Fixed a possible assertion bug for HA_ADMIN_TRY_ALTER
(If analyze would output a row, it fails since the row was already
started).
sql/sql_yacc.yy:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION
to use the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE
instead of taking the ALTER TABLE path.
Added reset of alter_info for ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE
since it is now used by partitioned tables.
storage/myisam/mi_check.c:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Changed warning message from "Found X parts Should be: Y parts"
to "Found X key parts. Should be Y", since it could be confusing
with partitioned tables.
Bug#35220: ALTER TABLE too picky on reserved word "foreign"
In ALTER TABLE, change the internal parser to search for
``FOREIGN[[:space:]]'' instead of only ``FOREIGN'' when parsing
ALTER TABLE ... DROP FOREIGN KEY ...; otherwise it could be mistaken
with ALTER TABLE ... DROP foreign_col;
(This fix is already present in MySQL 5.1 and higher.)
innodb-5.0-ss2475.
Bug #34286 Assertion failure in thread 2816 in file .\row\row0sel.c line 3500
Since autoinc init performs a MySQL SELECT query to determine the auto-inc
value, set prebuilt->sql_stat_start = TRUE so that it is performed like any
normal SELECT, regardless of the context in which it was invoked.
Bug #35352 If InnoDB crashes with UNDO slots full error the error persists on restart
We've added a heuristic that checks the size of the UNDO slots cache lists
(insert and upate). If either of cached lists has more than 500 entries then we
add any UNDO slots that are freed, to the common free list instead of the cache
list, this is to avoid the case where all the free slots end up in only one of
the lists on startup after a crash.
Tested with test case for 26590 and passes all mysql-test(s).
Bug #36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
Fixed by removing the Innodb_buffer_pool_pages_latched variable from SHOW
STATUS output in non-UNIV_DEBUG compilation.
min() and max() functions are implemented in MySQL as macros.
This means that max(a,b) is expanded to: ((a) > (b) ? (a) : (b))
Note how 'a' is quoted two times.
Now imagine 'a' is a recursive function call that's several 10s of levels deep.
And the recursive function does max() with a function arg as well to dive into
recursion.
This means that simple function call can take most of the clock time.
Identified and fixed several such calls to max()/min() : including the IF()
sql function implementation.
mysql-test/r/func_if.result:
Bug#37662 test case
mysql-test/t/func_if.test:
Bug#37662 test case
sql/item.cc:
Bug#37662 don't call expensive functions as arguments to min/max
sql/item_cmpfunc.cc:
Bug#37662 don't call expensive functions as arguments to min/max
sql/item_func.cc:
Bug#37662 don't call expensive functions as arguments to min/max
Post-push fix: updated some result files that were affected
by the previous fix to this bug.
mysql-test/suite/binlog/r/binlog_killed_simulate.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Updated result file.
mysql-test/suite/rpl/r/rpl_stm_log.result:
Updated result file.
Problem: Extra new line appeared in jisx0208_sjis2.dat in a mistake, which
broke jp_convert_sjis and jp_select_sjis tests.
Fix: removing extra line
mysql-test/suite/jp/std_data/jisx0208_sjis2.dat:
removing wrong extra new line
mysql-test/suite/jp/t/disabled.def:
activating disabled tests
Calling List<Cached_item>::delete_elements for the same list twice
caused a crash of the server in the function JOIN::cleaunup.
Ensured that delete_elements() in JOIN::cleanup would be called only once.
mysql-test/r/subselect.result:
Added a test case for bug #38191.
mysql-test/t/subselect.test:
Added a test case for bug #38191.
sql/sql_select.cc:
Fixed bug #38191.
Ensured that delete_elements() in JOIN::cleanup would be called only once.
Problem: binlog_stm_binlog runs INSERT DELAYED queries, and
then prints the contents of the binlog. Before checking the
contents of the binlog, the test waits until the rows have
appeared in the table. However, this is not enough, since
INSERT DELAYED does not write rows to the binlog at the same
time as it writes them to the table. So there is a race.
Fix: Add a FLUSH TABLES before SHOW BINLOG EVENTS. That
waits until the insert_delayed thread is done.
mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
- Added FLUSH TABLES, so that SHOW BINLOG EVENTS becomes
deterministic.
- Added comments.
- Removed unnecessary 'set @@session.auto_increment_increment'
statements.
- Removed unnecessary check that the number of rows inserted
to the table is 11.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
updated result file
BUG#37884: rpl_row_basic_2myisam and rpl_row_basic_3innodb fail sporadically in pushbuild
These have been fixed in 5.1-rpl. Re-applying fix for BUG#37884
in 5.1-bugteam, and disabling rpl_flushlog_loop for BUG#37733 in
5.1-bugteam.
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Missing sync_slave_with_master added.
mysql-test/suite/rpl/t/disabled.def:
Disabling rpl_flushlog_loop until the fixed version gets
merged from 5.1-rpl
Range scan in descending order for c <= <col> <= c type of
ranges was ignoring the DESC flag.
However some engines like InnoDB have the primary key parts
as a suffix for every secondary key.
When such primary key suffix is used for ordering ignoring
the DESC is not valid.
But we generally would like to do this because it's faster.
Fixed by performing only reverse scan if the primary key is used.
Removed some dead code in the process.
mysql-test/r/innodb_mysql.result:
Bug#37830 : test case
mysql-test/t/innodb_mysql.test:
Bug#37830 : test case
sql/opt_range.cc:
Bug#37830 :
- preserve and use used_key_parts to
distinguish when a primary key suffix is used
- removed some dead code
sql/opt_range.h:
Bug#37830 :
- preserve used_key_parts
- dead code removed
sql/sql_select.cc:
Bug#37830 : Do only reverse order traversal
if the primary key suffix is used.
Problem: the test waits for a 'DROP TEMPORARY TABLE' event to
appear in the master's binlog, then checks on the slave whether
the number of temporary tables has decreased. The slave does
not sync, causing a race.
Fix: check for the 'DROP TEMPORARY TABLE' event on slave
instead of on master.
mysql-test/suite/rpl/t/rpl_trunc_temp.test:
- Fixed BUG#37493 by waiting for the event on the slave
instead of on the master.
- Added comments.
This is not a fix to the bug. It only adds debug info, so
that we can analyze the bug better next time it happens.
Please revert the patch after the bug is fixed.
mysql-test/suite/rpl/t/rpl_incident.test:
Added debug info. This will only be printed if the
test fails.
the reason for the failure is that io thread passes through a sequence of state
changes before it eventually got stuck at the expect running state as NO.
It's unreasonble to wait for the running status while the whole idea of the test is
to get to the IO thread error.
Fixed with changing the waiting condition.
mysql-test/suite/rpl/r/rpl_server_id1.result:
results changed
mysql-test/suite/rpl/t/disabled.def:
re-enabling rpl_server_id1
mysql-test/suite/rpl/t/rpl_server_id1.test:
deploying the exact waiting condition i.e to wait for the slave io error.
Problem: master binlog has 'create table t1'. Master binlog
was removed before slave could replicate it. In test's cleanup
code, master did 'drop table t1', which caused slave sql
thread to stop with an error since slave sql thread did not
know about t1.
Fix: t1 is just an auxiliary construction, only needed on
master. Hence, we turn off binlogging before t1 is created,
drop t1 as soon as we don't need it anymore, and then turn
on binlogging again.
mysql-test/include/show_binlog_events.inc:
Filter out directories and block_len from
LOAD DATA INFILE events.
mysql-test/suite/rpl/r/rpl_loaddata_map.result:
updated result file
mysql-test/suite/rpl/t/rpl_loaddata_map.test:
Turn off binlogging while t1 is used, drop t1 as soon
as we don't need it anymore, and turn on binlogging again.
Also added some comments and replaced 'show binlog events'
by 'source include/show_binlog_events.inc'.
- Revert the fix for bug 33812
- fixed a win32 warning
client/mysql.cc:
revert the fix for bug 33812
mysql-test/r/mysql.result:
revert the fix for bug 33812
mysql-test/t/mysql_delimiter.sql:
revert the fix for bug 33812
mysys/default.c:
fixed a win32 warning
Many dump threads can exist due to a way the new version of mtr governs suites.
For this immediate problem the test is refined not to use I_S but rather to reconnect
explicitly with preserving logics of a an old target bug fixes verification.
mysql-test/suite/rpl/r/rpl_temporary.result:
results changed
mysql-test/suite/rpl/t/rpl_temporary.test:
refining the bug#17284 test to avoid counting dump threads in favor to reconnect
explicitly with preserving the orig logics.
Problem: the test set @@global.init_slave to garbage at a time
which was not guaranteed to be after the time when the slave's
SQL thread used it. That would cause the slave's SQL thread to
stop in rare cases.
Fix: The test does not care about the value of
@@global.init_slave, except that it should be different on
master and slave. Hence, we set @@global.init_slave to
something that is valid SQL.
mysql-test/suite/rpl/r/rpl_variables.result:
updated result file.
mysql-test/suite/rpl/t/rpl_variables.test:
Set @@global.init_slave to something that is valid SQL.
Range scan in descending order for c <= <col> <= c type of
ranges was ignoring the DESC flag.
However some engines like InnoDB have the primary key parts
as a suffix for every secondary key.
When such primary key suffix is used for ordering ignoring
the DESC is not valid.
But we generally would like to do this because it's faster.
Fixed by performing only reverse scan if the primary key is used.
Removed some dead code in the process.
mysql-test/r/innodb_mysql.result:
Bug#37830 : test case
mysql-test/t/innodb_mysql.test:
Bug#37830 : test case
sql/opt_range.cc:
Bug#37830 :
- preserve and use used_key_parts to
distinguish when a primary key suffix is used
- removed some dead code
sql/opt_range.h:
Bug#37830 :
- preserve used_key_parts
- dead code removed
sql/sql_select.cc:
Bug#37830 : Do only reverse order traversal
if the primary key suffix is used.
mysqltest disconnect/connect-combo could be so
quick that connect would hit the server before
it had processed the disconnect. Since that
resulted in one more concurrent connection than
we meant to have, global or per-user
max-user-connections could be exceeded.
This could lead to "random" failures in tests
that set those limits.
client/mysqltest.c:
Retry max-connect-retries times if connect in
connect_n_handle_errors() unexpectedly fails
on connection-limit as this could be a race.
Break out code that checks for expected --errors
into its own function.
mysql-test/r/mysqltest.result:
show that we throw a warning if test expects a SQL-state from
a command (diff_files, ...) that clearly can't produce one.
mysql-test/t/disabled.def:
re-enable user_limits
mysql-test/t/mysqltest.test:
show that we throw a warning if test expects a SQL-state from
a command (diff_files, ...) that clearly can't produce one.
build)
The crash was caused by freeing the internal parser stack during the parser
execution.
This occured only for complex stored procedures, after reallocating the parser
stack using my_yyoverflow(), with the following C call stack:
- MYSQLparse()
- any rule calling sp_head::restore_lex()
- lex_end()
- x_free(lex->yacc_yyss), xfree(lex->yacc_yyvs)
The root cause is the implementation of stored procedures, which breaks the
assumption from 4.1 that there is only one LEX structure per parser call.
The solution is to separate the LEX structure into:
- attributes that represent a statement (the current LEX structure),
- attributes that relate to the syntax parser itself (Yacc_state),
so that parsing multiple statements in stored programs can create multiple
LEX structures while not changing the unique Yacc_state.
Now, Yacc_state and the existing Lex_input_stream are aggregated into
Parser_state, a structure that represent the complete state of the (Lexical +
Syntax) parser.
mysql-test/r/parser_stack.result:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
mysql-test/t/parser_stack.test:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sp.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sp_head.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_class.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_class.h:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_lex.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_lex.h:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_parse.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_prepare.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_trigger.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_view.cc:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
sql/sql_yacc.yy:
Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)
and value-list
The server returns unexpected results if a right side of the
NOT IN clause consists of NULL value and some constants of
the same type, for example:
SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2)
may return 3, 4, 5 etc if a table contains these values.
The Item_func_in::val_int method has been modified:
unnecessary resets of an Item_func_case::has_null field
value has been moved outside of an argument comparison
loop. (Also unnecessary re-initialization of the null_value
field has been moved).
mysql-test/r/func_in.result:
Added test case for bug #37761.
mysql-test/t/func_in.test:
Added test case for bug #37761.
sql/item_cmpfunc.cc:
Bug #37761: IN handles NULL differently for table-subquery
and value-list
The Item_func_in::val_int method has been modified:
unnecessary resets of an Item_func_case::has_null field
value has been moved outside of an argument comparison
loop. (Also unnecessary re-initialization of the null_value
field has been moved).
Problem was that ha_partition had HA_FILE_BASED flag set
(since it uses a .par file), but after open it uses the first partitions
flags, which results in different case handling for create and for
open.
Solution was to change the underlying partition name so it was consistent.
(Only happens when lower_case_table_names = 2, i.e. Mac OS X and storage
engines without HA_FILE_BASED, like InnoDB and Memory.)
(Recommit after adding rename of check_lowercase_names to
get_canonical_filename, and moved it from handler.h to mysql_priv.h)
NOTE: if a mixed case name for a partitioned table was created when
lower_case_table_name = 2 it should be renamed or dropped before using
the updated version (See bug#37402 for more info)
mysql-test/include/have_case_insensitive_file_system.inc:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Added include file.
mysql-test/include/have_lowercase0.inc:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
moved case insensitive file system to a new file, leaving only
lower_case_table_names.
mysql-test/include/have_lowercase2.inc:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Added include file.
mysql-test/lib/mtr_report.pl:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Removed a duplicate row and suppressed warning about setting
lower_case_table_names to 2 on case sensitive file systems.
mysql-test/r/case_insensitive_file_system.require:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Added requirement file.
mysql-test/r/lowercase0.require:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
moved case insensitive file system to a new file, leaving only
lower_case_table_names.
mysql-test/suite/parts/inc/partition_mgm.inc:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New include file for testing partitioning management functions for different
settings of lower_case_table_names.
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New result file.
mysql-test/suite/parts/t/partition_mgm_lc0_archive.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_innodb.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_memory.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_myisam.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_archive-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_archive.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_innodb-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_innodb.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_memory-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_memory.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_myisam-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_myisam.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_archive-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_archive.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_innodb-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_innodb.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_memory-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_memory.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_myisam-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_myisam.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
New test file.
mysql-test/t/lowercase_table3.test:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Moved case sensitive file system to a specific inc-file instead of
included in lowercase0.inc
sql/ha_partition.cc:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Problem was that ha_partition had HA_FILE_BASED set
(since it uses a .par file), but after open it uses the first partitions
table_flags(), which results in different case handling for create and for
open.
Solution was to change the underlying partition name so it was consistent.
(Only happens when lower_case_table_names = 2, i.e. Mac OS X)
sql/handler.cc:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Renamed check_lowercase_names to get_canonical_filename, and exported it
so that ha_partition.cc can use the function.
sql/mysql_priv.h:
Bug#37402: Mysql cant read partitioned table with capital letter in the name
Renamed check_lowercase_names to get_canonical_filename, and exported it
so that ha_partition.cc can use the function.
offset for time part in UUIDs was 1/1000 of what it
should be. In other words, offset was off.
Also handle the case where we count into the future
when several UUIDs are generated in one "tick", and
then the next call is late enough for us to unwind
some but not all of those borrowed ticks.
Lastly, handle the case where we keep borrowing and
borrowing until the tick-counter overflows by also
changing into a new "numberspace" by creating a new
random suffix.
mysql-test/r/func_misc.result:
Show that time-part of UUIDs is correct now.
mysql-test/t/func_misc.test:
Show that time-part of UUIDs is correct now
by replicating the C-code's resultin SQL.
Results also decode to expect date-data on
command-line (external validation).
No test for unwinding of borrowed ticks as
this a) is a race and b) depends on what timer
we get.
sql/item_strfunc.cc:
correct offset for date/time-part of UUID.
also make sure that when we counted into
the future earlier (several UUIDs generated
in same tick), we only give back as many
"borrowed" ticks as we can without duplicating
past timestamps. If our tick-counter overflows
before we can give back, or if the system-clock
is set back (by user or Daylight Saving Time),
we create a new random suffix to avoid
collisions and clear the tick-counter.
offset for time part in UUIDs was 1/1000 of what it
should be. In other words, offset was off.
Also handle the case where we count into the future
when several UUIDs are generated in one "tick", and
then the next call is late enough for us to unwind
some but not all of those borrowed ticks.
Lastly, handle the case where we keep borrowing and
borrowing until the tick-counter overflows by also
changing into a new "numberspace" by creating a new
random suffix.
mysql-test/r/func_misc.result:
Show that time-part of UUIDs is correct now.
mysql-test/t/func_misc.test:
Show that time-part of UUIDs is correct now
by replicating the C-code's resultin SQL.
Results also decode to expect date-data on
command-line (external validation).
No test for unwinding of borrowed ticks as
this a) is a race and b) depends on what timer
we get.
sql/item_strfunc.cc:
correct offset for date/time-part of UUID.
also make sure that when we counted into
the future earlier (several UUIDs generated
in same tick), we only give back as many
"borrowed" ticks as we can without duplicating
past timestamps. If our tick-counter overflows
before we can give back, or if the system-clock
is set back (by user or Daylight Saving Time),
we create a new random suffix to avoid
collisions and clear the tick-counter.
The problem is that relying on the output of the 'ls' command is not
portable as its behavior is not the same between systems and it might
even not be available at all in (Windows).
So I added list_files that relies on the portable mysys library instead.
(and also list_files_write_file and list_files_append_file,
since the test was using '--exec ls' in that way.)
client/mysqltest.c:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
To be able to replace the use of '--exec ls' I have added
list_files, list_files_write_file and list_files_append_file.
list_files <dirname> [<filename incl. wild-cards>]
is equivalent to 'ls <dirname>/[<filename incl. wild-cards>]'
list_files_write_file creates/overwrites a file with the content
list_files_append_file creates/appends a file with the content
list_files* return a sorted output.
mysql-test/r/mysqltest.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
result file change, due to added test of the new list_files command.
mysql-test/suite/parts/inc/partition_check_drop.inc:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Using the new list_files instead of 'ls'.
Changed the use of local variables (ls_file, file_list)
and server variable (@aux).
mysql-test/suite/parts/inc/partition_layout.inc:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Using the new list_files instead of 'ls'.
mysql-test/suite/parts/inc/partition_layout_check1.inc:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Using the new list_files instead of 'ls'.
mysql-test/suite/parts/inc/partition_layout_check2.inc:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter2_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter3_innodb.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter3_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_basic_innodb.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_basic_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_engine_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_syntax_myisam.result:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Replaces '--exec ls' with list_files.
Removal of the directory part of file listing.
mysql-test/t/mysqltest.test:
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
Adding test for the new mysqltest commands list_files,
list_files_write_file and list_files_append_file.
problem was that ha_partition::records was not implemented, thus
using the default handler::records, which is not correct if the engine
does not support HA_STATS_RECORDS_IS_EXACT.
Solution was to implement ha_partition::records as a wrapper around
the underlying partitions records.
The rows column in explain partitions will now include the total
number of records in the partitioned table.
(recommit after removing out-commented code)
enabled)
Before this fix, the lexer and parser would treat the ';' character as a
different token (either ';' or END_OF_INPUT), based on convoluted logic,
which failed in simple cases where a stored procedure is implemented as a
single statement, and used in a multi query.
With this fix:
- the character ';' is always parsed as a ';' token in the lexer,
- parsing multi queries is implemented in the parser, in the 'query:' rules,
- the value of thd->client_capabilities, which is the capabilities
negotiated between the client and the server during bootstrap,
is immutable and not arbitrarily modified during parsing (which was the
root cause of the bug)
Problem was that auto_repair, is_crashed and check_and_repair was not
implemented in ha_partition.
Solution, implemented them as loop over all partitions for is_crashed and
check_and_repair, and using the first partition for auto_repair.
(Recommit after fixing review comments)
mysql-test/lib/mtr_report.pl:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Added filter for crashed tables, when testing auto repair
mysql-test/std_data/corrupt_t1#P#p1.MYI:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Corrupt MYI file for testing auto repair
mysql-test/std_data/corrupt_t1.MYI:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Corrupt MYI file for testing auto repair
mysql-test/suite/parts/r/partition_repair_myisam.result:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Result file for testing auto repair of crashed myisam partitions
mysql-test/suite/parts/t/partition_repair_myisam-master.opt:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
opt file for testing auto repair of crashed myisam partitions
mysql-test/suite/parts/t/partition_repair_myisam.test:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Test file for testing auto repair of crashed myisam partitions
sql/ha_partition.cc:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Added auto_repair as returning the first partitions auto_repair
Added is_crashed and check_and_repair as loop over all partitions
sql/ha_partition.h:
Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Activating check_and_repair, auto_repair and is_crashed
- moved the test into a separate file to check for presence of the test variable
mysql-test/r/subselect.result:
Bug#37627: moved the test to a separate file
mysql-test/r/subselect_debug.result:
Bug#37627: moved the test to a separate file
mysql-test/t/subselect.test:
Bug#37627: moved the test to a separate file
mysql-test/t/subselect_debug.test:
Bug#37627: moved the test to a separate file
When there is an error executing EXISTS predicates they return NULL as their string
or decimal value but don't set the NULL value flag.
Fixed by returning 0 (as a decimal or a string) on error exectuting the subquery.
Note that we can't return NULL as EXISTS is not supposed to return NULL.
mysql-test/r/subselect.result:
Bug#37627: test case
mysql-test/t/subselect.test:
Bug#37627: test case
sql/item_subselect.cc:
Bug#37627: return decimal (or string) 0 isntead of a NULL pointer on
error calculating an EXISTS predicate.
Bug#12093 "SP not found on second PS execution if another thread
drops other SP in between" and
Bug#21294 "executing a prepared statement that executes a stored
function which was recreat"
Stored functions are resolved at prepared statement prepare only.
If someone flushes the stored functions cache between prepare and
execute, execution fails.
The fix is to detect the situation of the cache flush and automatically
reprepare the prepared statement after it.
mysql-test/r/ps_ddl.result:
Update results (Bug#12093 and Bug#21294, the test cases are already
in the source tree).
mysql-test/r/ps_ddl1.result:
Update results (Bug#12093 and Bug#21294, the test cases are already
in the source tree).
mysql-test/r/sp-error.result:
Update results (Bug#12093 and Bug#21294, the test cases are already
in the source tree).
mysql-test/t/ps_ddl.test:
Modify the test to not expect an error where there is no error
any more (Bug#12093, Bug#21294).
mysql-test/t/ps_ddl1.test:
Modify the test to not expect an error where there is no error
any more (Bug#12093, Bug#21294).
mysql-test/t/sp-error.test:
Modify the test to not expect an error where there is no error
any more (Bug#12093, Bug#21294).
sql/sp_cache.cc:
Implement sp_cache_version() -- returns the current version of
a stored routines cache.
sql/sp_cache.h:
Declare sp_cache_version().
sql/sql_prepare.cc:
Keep track of stored functions cache version, and invalidate
the statement if it changed between prepared statement
prepare and execute (and the statement actually uses stored routines).
This bug has been fixed in two slightly different ways in
6.0-rpl and {5.1,6.0}-bugteam. To avoid future merge
problems, I'm now copying the 6.0-rpl fix to 5.1-bugteam.
The previous fix for the bug was incomplete. The test failed
because t2 did not exist on the slave (since the slave was
lagging) when the
wait_condition was executed. Fixed by inserting
sync_slave_with_master just after t2 was created.
Test was failing due to the addition of a '\x05' character in result sets
Latest builds of the server have shown this problem to have disappeared.
Removing code within the test that disables the test on Mac OS X.
Recommit due to tree error on earlier, approved patch.
REORGANIZE TEST parts WHERE ENGINE='NDB' ;)
Updated tests for better matching NDB's limitations.
Removed some duplicate tests.
mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
Bug#36732: many disabled ndb tests in test suite parts
Added variable for NDB (since it does not support
DROP PARTITION)
mysql-test/suite/parts/inc/partition_alter_11.inc:
Bug#36732: many disabled ndb tests in test suite parts
Assigning directly to variable without going
through the server.
mysql-test/suite/parts/inc/partition_bigint.inc:
Bug#36732: many disabled ndb tests in test suite parts
Added --sorted_result for consistency
lowered number of partitions for use with NDB
(NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_int.inc:
Bug#36732: many disabled ndb tests in test suite parts
Added --sorted_result for consistency
lowered number of partitions for use with NDB
(NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_mediumint.inc:
Bug#36732: many disabled ndb tests in test suite parts
Added --sorted_result for consistency
lowered number of partitions for use with NDB
(NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_smallint.inc:
Bug#36732: many disabled ndb tests in test suite parts
Added --sorted_result for consistency
lowered number of partitions for use with NDB
(NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
Bug#36732: many disabled ndb tests in test suite parts
Made it work better with NDB
mysql-test/suite/parts/inc/partition_tinyint.inc:
Bug#36732: many disabled ndb tests in test suite parts
Added --sorted_result for consistency
lowered number of partitions for use with NDB
(NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/r/ndb_blob_partition.result:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/ndb_partition_error.result:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_partition_key.result:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_partition_list.result:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_partition_range.result:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_alter1_1_innodb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_alter1_2_innodb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file.
Diff bigger than necessary, due to bzr diff bug.
mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_alter2_innodb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_alter2_myisam.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_engine_ndb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_int_innodb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_int_myisam.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/partition_int_ndb.result:
Bug#36732: many disabled ndb tests in test suite parts
Updated result file
mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/rpl_ndb
mysql-test/suite/parts/t/disabled.def:
Bug#36732: many disabled ndb tests in test suite parts
Removed some duplicate tests, fixed some tests.
Removed the 'runs too long on PB' test from
disabled.def and made them to require 'big-test'.
mysql-test/suite/parts/t/ndb_blob_partition.test:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_dd_backuprestore.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/ndb_partition_error.test:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_partition_key.test:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_partition_list.test:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_partition_range.test:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/ndb
mysql-test/suite/parts/t/part_supported_sql_func_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
Added ndb restriction variables.
mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
requiring big-test instead of disable it.
mysql-test/suite/parts/t/partition_alter1_1_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
requiring big-test instead of disable it.
mysql-test/suite/parts/t/partition_alter1_2_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
requiring big-test instead of disable it.
mysql-test/suite/parts/t/partition_alter2_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/partition_basic_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/partition_bit_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/partition_engine_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/partition_int_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/partition_syntax_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/partition_value_ndb.test:
Bug#36732: many disabled ndb tests in test suite parts
Added new=on for allowing test of
hash/range and list partitioning.
mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test:
Bug#36732: many disabled ndb tests in test suite parts
Removing this duplicate test since it already
exists (and updated) in suite/rpl_ndb
Bug#36787 Test funcs_1.charset_collation_1 failing
Details:
1. Skip charset_collation_1 if charset "ucs2_bin" is
missing (property which distincts "vanilla" builds
from the others)
2. Let builds with version_comment LIKE "%Advanced%"
(found them for 5.1) execute charset_collation_3.
3. Update comments charset_collation.inc so that they
reflect the current experiences.
In order to handle CHAR() fields, 8 bits were reserved for
the size of the CHAR field. However, instead of denoting the
number of characters in the field, field_length was used which
denotes the number of bytes in the field.
Since UTF-8 fields can have three bytes per character (and
has been extended to have four bytes per character in 6.0),
an extra two bits have been encoded in the field metadata
work for fields of type Field_string (i.e., CHAR fields).
Since the metadata word is filled, the extra bits have been
encoded in the upper 4 bits of the real type (the most
significant byte of the metadata word) by computing the
bitwise xor of the extra two bits. Since the upper 4 bits
of the real type always is 1111 for Field_string, this
means that for fields of length <256, the encoding is
identical to the encoding used in pre-5.1.26 servers, but
for lengths of 256 or more, an unrecognized type is formed,
causing an old slave (that does not handle lengths of 256
or more) to stop.
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Adding test cases for replicating UTF-8 fields of lengths
of 256 or more (bytes).
mysql-test/suite/binlog/r/binlog_base64_flag.result:
Result file change.
mysql-test/suite/binlog/t/binlog_base64_flag.test:
Adding tests to trigger check that an error is generated when replicating from a
5.1.25 server for tables with a CHAR(128) but not when replicating a table with a
CHAR(63). Although the bug indicates that the limit is 83, we elected to use CHAR(63)
since 6.0 uses 4-byte UTF-8, and anything exceeding 63 would then cause the test to fail
when the patch is merged to 6.0.
mysql-test/suite/bugs/combinations:
Adding combinations file to run all bug reports in all binlog modes (where
applicable).
mysql-test/suite/bugs/r/rpl_bug37426.result:
Result file change.
mysql-test/suite/bugs/t/rpl_bug37426.test:
Added test for reported bug.
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
Result file change.
sql/field.cc:
Encoding an extra two bits in the most significant nibble (4 bits)
of the metadata word. Adding assertions to ensure that no attempt
is made to use lengths longer than supported.
Extending compatible_field_size() function with an extra parameter
holding a Relay_log_instace for error reporting.
Field_string::compatible_field_size() now reports an error if field
size for a CHAR is >255.
sql/field.h:
Field length is now computed from most significant 4 bits
of metadata word, or is equal to the row pack length if
there is no metadata.
Extending compatible_field_size() function with an extra parameter
holding a Relay_log_instace for error reporting.
sql/rpl_utility.cc:
Adding relay log parameter to compatible_field_size().
Minor refactoring to eliminate duplicate code.
sql/slave.cc:
Extending rpl_master_has_bug() with a single-argument predicate function and
a parameter to the predicate function. The predicate function can be used to
test for extra conditions for the bug before writing an error message.
sql/slave.h:
Extending rpl_master_has_bug() with a single-argument predicate function and
a parameter to the predicate function. The predicate function can be used to
test for extra conditions for the bug before writing an error message.
Also removing gratuitous default argument.
sql/sql_insert.cc:
Changing calls to rpl_master_has_bug() to adapt to changed signature.
Problem: rpl_switch_stm_row_mixed did not wait until row events generated by
INSERT DELAYED were written to the master binlog before it synchronized slave
with master. This caused sporadic errors where these rows were missing on
slave.
Fix: wait until all rows appear on the slave.
This is a backport, applying the same to 5.1-bugteam as was previously
applied to 6.0-rpl
InnoDB table, where all selected columns
belong to the same unique index key, returns
incorrect results
Server executes some queries via QUICK_GROUP_MIN_MAX_SELECT
(MIN/MAX optimization for queries with GROUP BY or DISTINCT
clause) and that optimization implies loose index scan, so all
grouping is done by the QUICK_GROUP_MIN_MAX_SELECT::get_next
method.
The server does not set the precomputed_group_by flag for some
QUICK_GROUP_MIN_MAX_SELECT queries and duplicates grouping by
call to the end_send_group function.
Fix: when the test_if_skip_sort_order function selects loose
index scan as a best way to satisfy an ORDER BY/GROUP BY type
of query, the precomputed_group_by flag has been set to use
end_send/end_write functions instead of end_send_group/
end_write_group functions.
mysql-test/r/group_min_max_innodb.result:
Fixed bug #36632: SELECT DISTINCT from a simple view on an
InnoDB table, where all selected columns
belong to the same unique index key, returns
incorrect results
mysql-test/t/group_min_max_innodb.test:
Fixed bug #36632: SELECT DISTINCT from a simple view on an
InnoDB table, where all selected columns
belong to the same unique index key, returns
incorrect results
sql/sql_select.cc:
Fixed bug #36632: SELECT DISTINCT from a simple view on an
InnoDB table, where all selected columns
belong to the same unique index key, returns
incorrect results
Bug#35658 (An empty binary value leads to mysqld crash)
Before this fix, the following token
b''
caused the parser to crash when reading the binary value from the empty string.
The crash was caused by:
ptr+= max_length - 1;
because max_length is unsigned and was 0, causing an overflow.
With this fix, an empty binary literal b'' is parsed as a binary value 0,
in Item_bin_string.
mysql-test/r/varbinary.result:
Bug#35658 (An empty binary value leads to mysqld crash)
mysql-test/t/varbinary.test:
Bug#35658 (An empty binary value leads to mysqld crash)
sql/item.cc:
Bug#35658 (An empty binary value leads to mysqld crash)
Bug#35658 (An empty binary value leads to mysqld crash)
Before this fix, the following token
b''
caused the parser to crash when reading the binary value from the empty string.
The crash was caused by:
ptr+= max_length - 1;
because max_length is unsigned and was 0, causing an overflow.
With this fix, an empty binary literal b'' is parsed as a binary value 0,
in Item_bin_string.
mysql-test/r/varbinary.result:
Bug#35658 (An empty binary value leads to mysqld crash)
mysql-test/t/varbinary.test:
Bug#35658 (An empty binary value leads to mysqld crash)
sql/item.cc:
Bug#35658 (An empty binary value leads to mysqld crash)
Bug#35658 (An empty binary value leads to mysqld crash)
Before this fix, the following token
b''
caused the parser to crash when reading the binary value from the empty string.
The crash was caused by:
ptr+= max_length - 1;
because max_length is unsigned and was 0, causing an overflow.
With this fix, an empty binary literal b'' is parsed as a binary value 0,
in Item_bin_string.
mysql-test/r/varbinary.result:
Bug#35658 (An empty binary value leads to mysqld crash)
mysql-test/t/varbinary.test:
Bug#35658 (An empty binary value leads to mysqld crash)
sql/item.cc:
Bug#35658 (An empty binary value leads to mysqld crash)
Bug#33812: mysql client incorrectly parsing DELIMITER
Remove unnecessary and incorrect code that tried
to pull delimiter commands out of the middle of
statements.
as a commentary
mysql client has been modified to interpret EOL after
standalone -- commentary strings like whitespace
character (according to
http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html)
mysql-test/t/mysql_delimiter.sql:
Added test case for bug #36244.
Remove unnecessary and incorrect code that tried
to pull delimiter commands out of the middle of
statements.
client/mysql.cc:
Remove unnecessary and incorrect code that tried
to pull delimiter commands out of the middle of
statements.
mysql-test/r/mysql.result:
show we no longer parse DELIMITER when
we shouldn't.
mysql-test/t/mysql_delimiter.sql:
show we no longer parse DELIMITER when
we shouldn't.
Remove unnecessary and incorrect code that tried to pull delimiter commands out of the
middle of statements
client/mysql.cc:
Bug#33812: remove incorrect code
mysql-test/r/mysql.result:
Bug#33812: test case
mysql-test/t/mysql_delimiter.sql:
Bug#33812: test case
The crash appeared to be a result of allocating an instance of Discrete_interval
automatically that that was referred in out-of-declaration scope.
Fixed with correcting backing up and restoring scheme of
auto_inc_intervals_forced, introduced by bug#33029, by means of shallow copying;
added simulation code that forces executing those fixes of the former bug that
targeted at master-and-slave having incompatible bug#33029-prone versions.
mysql-test/suite/bugs/r/rpl_bug33029.result:
new results file
mysql-test/suite/bugs/t/rpl_bug33029.test:
test merely checks no crash happens on slave.
sql/slave.cc:
forcing to execute special logics implemented for bug#33029 if
simulate_bug33029 the debug option is set.
sql/sql_class.cc:
swaps of backed and the actual auto_inc_intervals_forced basing on shallow coping.
sql/structs.h:
Removing the deep _copy() and methods associated with it;
adding methods to Discrete_intervals_list:
private `=', copy constructor to prevent using;
private set_members();
public copy_shallow(), swap(), get_{head, tail, current}();
empty_no_free() through set_members().
replicated correctly between machines with
mixed endiannes
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Added regression test for bug#37076.
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
Added regression test for bug#37076.
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
Added regression test for bug#37076.
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
Added regression test for bug#37076.
sql/field.h:
Fixed bug #37076: TIMESTAMP/DATETIME/DATE values are not
replicated correctly between machines with
mixed endiannes
pack and unpack virtual methods have been overloaded for
Field_timestamp (TIMESTAMP domain), Field_datetime (DATETIME
domain) and Field_date (DATE domain) classes to replicate data
between platforms with different endiannes in a correct way
like in Field_long and Field_longlong classes.
Common code have been moved to private handle_int32 and
handle_int64 private methods.
On a slow environment like valgrind the test is vulnerable
because it does not check if slave has stopped at time
of the new session is requested `start slave;' -- disabling
test till it is fixed.
mysql-test/suite/rpl/t/disabled.def:
disable rpl_server_id1 until test is fixed.
The value of JOIN::tables must be set to 0 when there
is no matching min/max row.
mysql-test/r/subselect.result:
Added a test case for bug #37004.
mysql-test/t/subselect.test:
Added a test case for bug #37004.
This bugs clarifies a warning message issued when the query cache data
size becomes smaller than the minium allowed size.
mysql-test/r/query_cache.result:
New warning message when a too small value has been set for query cache
size.
sql/set_var.cc:
To avoid poluting the QC API the warning messages are moved into the
QC module.
sql/share/errmsg.txt:
Changed error message so that minimal cache size always is hinted.
sql/sql_cache.cc:
Modified the warning message so that the minimal cache size always is
hinted.
Added interface method Query_cache::get_minimal_size_limit().
sql/sql_cache.h:
Modified the warning message so that the minimal cache size always is
hinted.
Added interface method Query_cache::get_minimal_size_limit().
37167 funcs_1: Many tests fail if the embedded
server is used.
37164 funcs_1: Some tests fail if an optional
character set is missing.
+ some cleanup within the testsuite related to the
fixes above
+ some adjustments to open bugs on Mac OS X
2. Skip tests which suffer from bug
37456 funcs_1: Several tests crash when used
with embedded server
3. Minor cleanup in some tests
The problem was that when a embedded linked version of mysqltest
crashed there was no way to obtain a stack trace if no core file
is available. Another problem is that the embedded version of
libmysql was not behaving (crash) the same as the non-embedded with
respect to sending commands to a explicitly closed connection.
The solution is to generate a mysqltest's stack trace on crash
and to enable "reconnect" if the connection handle was explicitly
closed so the behavior matches the non-embedded one.
client/CMakeLists.txt:
Link mysys to mysqltest.
client/Makefile.am:
Link mysys to mysqltest.
client/mysqltest.c:
Add fatal signal handling with backtracing for Unix and Windows.
configure.in:
Add check for weak symbols support and remove a spurious word.
include/Makefile.am:
Add new header with prototype for stack tracing functions.
include/my_stacktrace.h:
Add new header with prototype for stack tracing functions.
libmysqld/CMakeLists.txt:
stack tracing is now part of mysys.
libmysqld/Makefile.am:
stack tracing is now part of mysys.
libmysqld/lib_sql.cc:
Re-connect if connection was explicitly closed. This is
done to match the behavior of the non-embeded libmysql.
mysql-test/t/sql_low_priority_updates_func.test:
Test expects parallelism between queries that cannot be
guaranteed under embedded.
mysys/CMakeLists.txt:
Add stacktrace to mysys.
mysys/Makefile.am:
Add stacktrace to mysys.
mysys/stacktrace.c:
Move stacktrace to mysys and add weak symbol for the
C++ name de-mangling function so that it can later be
overridden in C++ code. Also add my_ prefix to exported
functions.
sql/CMakeLists.txt:
stacktrace was moved to mysys.
sql/Makefile.am:
stacktrace was moved to mysys.
sql/mysqld.cc:
Add my_ prefix to mysys functions.
Bug#37167 funcs_1: Many tests fail if the embedded server is used.
Bug#37164 funcs_1: Some tests fail if an optional character set is missing.
+ some cleanup within the testsuite related to the fixes above
+ some adjustments to open bugs on Mac OS X
The problem was that when comparing tables for a possible
fast alter table, the comparison was being performed using
the parsed information and not the final definition.
The solution is to use the possible final table layout to
compare if a fast alter is possible or not.
mysql-test/include/mix1.inc:
Disable test case for Bug 21704 as it hasn't been fixed.
mysql-test/r/alter_table.result:
Add test case result for Bug#33873
mysql-test/r/innodb_mysql.result:
Update test case result
mysql-test/t/alter_table.test:
Add test case for Bug#33873
sql/sql_table.cc:
Use updated (final) information to compare fields.
returns erroneous results
Used the wrong function when fixing 30480 which lead to
no stop on end_key resulting in duplicate results from index scan
Includes test cases for the duplicates 37327 and 37329,
Duplicate rows and bad performance/High Handler_read_next values
Recommit after merge issues
mysql-test/r/partition.result:
Bug#35931 List partition MyISAM table returns erroneous results
added test results.
mysql-test/t/partition.test:
Bug#35931 List partition MyISAM table returns erroneous results
added test for 35931, 37327 and 37329.
sql/ha_partition.cc:
Bug#35931 List partition MyISAM table returns erroneous results
HA_READ_ORDER is a index_flag, not a table_flag.
Error made in 30480.
Bug#37167 funcs_1: Many tests fail if the embedded server is used.
Bug#37164 funcs_1: Some tests fail if an optional character set is missing.
+ some cleanup within the testsuite related to the fixes above
+ some adjustments to open bugs on Mac OS X
Details:
- Remove the initial loading of data from tests if these data
are not somewhere retrieved
- Remove any use of columns with attribute unicode
(-> UCS2 is no more needed) from tests where unicode
properties are not checked or somehow required
- Create a separate branch of the Character maximum length test
(CML). If UCS2 is available than this test gets applied to
every available type of string column with attribute unicode
This prevents any loss of coverage by the points above.
- Disable the execution of is_tables_ndb which gives wrong
results because of a bug. Correct the exepected results of
this test.
- In case of tests failing when applied to the embedded server
1) Create a variant of this test for the embedded server
or
2) Skip the test in case of embedded server
depending on purpose and complexity of test.
- Skip the tests which could suffer from
Bug 28309 First insert violates unique constraint - was "memory" table empty ?
Bug 37380 Test funcs_1.is_columns_myisam_embedded fails on OS X
(both bugs Mac OS X, embedded server, MySQL 5.0 only)
- Minor improvements like remove typos
if cached query uses many tables
The problem was that query cache would not properly cache
queries which used 256 or more tables but yet would leave
behind query cache blocks pointing to freed (destroyed)
data. Later when invalidating (due to a truncate) query cache
would attempt to grab a lock which resided in the freed data,
leading to hangs or undefined behavior.
This was happening due to a improper return value from the
function responsible for registering the tables used in the
query (so the cache can be invalidated later if one of the
tables is modified). The function expected a return value of
type boolean (char, 8 bits) indicating success (1) or failure
(0) but the number of tables registered (unsigned int, 32 bits)
was being returned instead. This caused the function to return
failure for cases where it had actually succeed because when
a type (unsigned int) is converted to a narrower type (char),
the excess bits on the left are discarded. Thus if the 8
rightmost bits are zero, the return value will be 0 (failure).
The solution is to simply return true (1) only if the number of
registered table is greater than zero and false (0) otherwise.
mysql-test/r/query_cache_merge.result:
Add test case result for Bug#33362
mysql-test/t/query_cache_merge.test:
Add test case for Bug#33362
sql/sql_cache.cc:
Return 1 or 0 depending on the number of registered tables.
Problem was an unclear error message since it could suggest that
MyISAM did not support INSERT DELAYED.
Changed the error message to say that DELAYED is not supported by the
table, instead of the table's storage engine.
The confusion is that a partitioned table is in somewhat sense using
the partitioning storage engine, which in turn uses the ordinary
storage engine. By saying that the table does not support DELAYED we
do not give any extra informantion about the storage engine or if it
is partitioned.
mysql-test/r/innodb-replace.result:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/innodb-replace.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/merge.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/partition_hash.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
sql/share/errmsg.txt:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
added error message for tables not supporting DELAYED
sql/sql_insert.cc:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/r/federated_disabled.result:
Bug#37069 (5.0): test case
mysql-test/t/federated_disabled-master.opt:
Bug#37069 (5.0): test case
mysql-test/t/federated_disabled.test:
Bug#37069 (5.0): test case
Fix for this bug and additional improvements/fixes
In detail:
- Remove unicode attribute from several columns
(unicode properties were nowhere needed/tested)
of the table tb3
-> The runnability of these tests depends no more on
the availibility of some optional collations.
- Use a table tb3 with the same layout for all
engines to be tested and unify the engine name
within the protocols.
-> <engine>_trig_<abc>.result have the same content
- Do not load data into tb3 if these rows have no
impact on result sets
- Add tests for NDB (they exist already in 5.1)
- "--replace_result" at various places because
NDB variants of tests failed with "random" row
order in results
This fixes a till now unknown weakness within the
funcs_1 NDB tests existing in 5.1 and 6.0
- Fix the expected result of ndb_trig_1011ext
which suffered from Bug 32656
+ disable this test
- funcs_1 could be executed with the mysql-test-run.pl
option "--reorder", which saves some runtime by
optimizing server restarts.
Runtimes on tmpfs (one attempt only):
with reorder 132 seconds
without reorder 183 seconds
- Adjust two "check" statements within func_misc.test
which were incorrect (We had one run with result set
difference though the server worked good.)
- minor fixes in comments
The federated storage engine is now disabled by default.
mysql-test-run.pl is updated to enable it whenever it's required and available.
mysql-test/lib/mtr_cases.pl:
Bug#37069: mysql-test-run.pl automatically enables federated
for federated related tests
sql/sql_plugin.cc:
Bug#37069: federated is disabled by default
Upmerge of fix for this bug and a second similar problem
found during experimenting.
This replaces the first fix (already pushed to 5.1
and merged to 6.0) which
- failed in runs with the embedded server
- cannot be ported back to 5.0
Fix for this bug and a second similar problem
found during experimenting.
This replaces the first fix (already pushed to 5.1
and merged to 6.0) which
- failed in runs with the embedded server
- cannot be ported back to 5.0
Bug#36724 - Test funcs_1.<engine>_storedproc_02 needs to be updated
Bug#36726 - Test funcs_1.<engine>_storedproc failing - Needs to be updated on 5.1+
func_view bug: re-records .result files to account for addition of charset and collation data
to SHOW CREATE VIEW output
storedproc bugs: Added expected errors for those storedprocs that use SQLSTATE:00000
in their handlers. re-recorded .result files to account for these
expected errors.
mysql-test/suite/funcs_1/r/innodb_func_view.result:
Update result set for changes to SHOW CREATE VIEW output
mysql-test/suite/funcs_1/r/memory_func_view.result:
Updated result set due to changes in SHOW CREATE VIEW output
mysql-test/suite/funcs_1/r/myisam_func_view.result:
Updated result set due to changes in SHOW CREATE VIEW output
rpl_slave_status failed on pushbuild. The slave stopped with an
error. Adding sync_slave_with_master fixes the problem. Updated
test case.
mysql-test/suite/rpl/r/rpl_slave_status.result:
Updated result file.
mysql-test/suite/rpl/t/rpl_slave_status.test:
- Added comment explaining what the test does.
- Added sync_slave_with_master in two places where it was missing. This
caused sporadic pushbuild errors.
- Added wait_for_slave_to_{start,stop} after {START,STOP} SLAVE queries.
- Removed 'drop table if exists' from setup code.
- Replaced save_master_pos;connection slave;sync_with_master by
sync_slave_with_master.
- Replaced 'delete from mysql.user' by 'drop user'.
- Wrapped 'show slave status' inside query_get_value(), so that only what
we test is in the output.
The failing test case is depending on unnecessary status variable output
which changes based on build configuration. By reducing the output the test
becomes more stable.
mysql-test/r/status.result:
Modified test case
mysql-test/t/disabled.def:
Enabled status.test
mysql-test/t/status.test:
Modified test case.
and table DDL changed after PREPARE" to pass in embedded mode.
mysql-test/r/ps.result:
Update results (Bug#27430)
mysql-test/r/ps_ddl.result:
Update results (Bug#27430)
mysql-test/t/ps.test:
Add a test case for Bug#27430. ps.test is not run in --embedded-server,
thus it now contains the part of the test for Bug#27430 that
doesn't work in embedded server.
mysql-test/t/ps_ddl.test:
Move a part of the test for Bug#27430 that doesn't work
in embedded server to ps.test, that includes not_embedded.inc.
the local tree contains a fix for
Bug#32748 "Inconsistent handling of assignments to
general_log_file/slow_query_log_file",
which changes output of a number of tests.
mysql-test/r/general_log_file_basic.result:
Update results (Bug#32748)
mysql-test/r/log_output_basic.result:
Update the test with results of the fix for Bug#32748
mysql-test/r/slow_query_log_file_basic.result:
Update the test with results of the fix for Bug#32748
mysql-test/t/general_log_file_basic.test:
Adjust to take into account the fix for Bug#32748
(a port from 6.0-bugteam)
mysql-test/t/log_output_basic.test:
Adjust to take into account the fix for Bug#32748
(a port from 6.0-bugteam)
mysql-test/t/slow_query_log_file_basic.test:
Adjust to take into account the fix for Bug#32748
(a port from 6.0-bugteam)
tests/mysql_client_test.c:
Fix a compilation warning.
after PREPARE"
Update test results after a merge with the main tree: the new minimum for
the table definition cache is 256.
mysql-test/r/table_definition_cache_basic.result:
Update test results: the new minimum for table definition cache is 256
The test is vulnerable because it does not check if slave has stopped at time
of the new session is requested `start slave;'
Fixed with deploying explicitly wait_for_slave_to_stop synchronization macro.
into bodhi.(none):/opt/local/work/mysql-5.1-27430
Makefile.am:
Auto merged
include/my_global.h:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
sql/item.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.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
sql/sql_update.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
libmysqld/CMakeLists.txt:
Manual merge.
libmysqld/lib_sql.cc:
Manual merge.
mysql-test/t/disabled.def:
Manual merge.
first row or fails with an error:
ERROR 1022 (23000): Can't write; duplicate key in table ''
The server uses intermediate temporary table to store updated
row data. The first column of this table contains rowid.
Current server implementation doesn't reset NULL flag of that
column even if the server fills a column with rowid.
To keep each rowid unique, there is an unique index.
An insertion into an unique index takes into account NULL
flag of key value and ignores real data if NULL flag is set.
So, insertion of actually different rowids may lead to two
kind of problems. Visible effect of each of these problems
depends on an initial engine type of temporary table:
1. If multiupdate initially creates temporary table as
a MyISAM table (a table contains blob columns, and the
create_tmp_table function assumes, that this table is
large), it inserts only one single row and updates
only rows with one corresponding rowid. Other rows are
silently ignored.
2. If multiupdate initially creates MEMORY temporary
table, fills it with data and reaches size limit for
MEMORY tables (max_heap_table_size), multiupdate
converts MEMORY table into MyISAM table and fails
with an error:
ERROR 1022 (23000): Can't write; duplicate key in table ''
Multiupdate has been fixed to update the NULL flag of
temporary table rowid columns.
mysql-test/r/multi_update_tiny_hash.result:
Added test case for bug#36676.
mysql-test/t/multi_update_tiny_hash-master.opt:
Added test case for bug#36676.
mysql-test/t/multi_update_tiny_hash.test:
Added test case for bug#36676.
sql/sql_update.cc:
Fixed bug#36676: multiupdate using LEFT JOIN updates only
first row or fails with an error:
ERROR 1022 (23000): Can't write; duplicate key in table ''
The multi_update::send_data method has been modified to reset null bits of
fields containing rowids.