WL#3397 Refactoring storage engine test cases (for falcon)
It contains also fixes according to code review.
Contents: Testcases which were in history dedicated to InnoDB or MyISAM only.
Modifications:
1. Shift the main testing code into include/<testing field>.inc
Introduce $variables which can be used to omit tests for features which are not supported by
certain storage engines.
2. The storage engine to be tested is assigned within the toplevel script (t/<whatever>_<engine>.test)
via variable $engine_type and the the main testing code is sourced from
include/<testing field>.inc
3. Some toplevel testscripts have to be renamed to
- avoid immediate or future namespace clashes
- show via filename which storage engine is tested
4. Minor code cleanup like remove trailing spaces, some additional comments ....
mysql-test/t/unsafe_binlog_innodb-master.opt:
Rename: mysql-test/t/innodb_unsafe_binlog-master.opt -> mysql-test/t/unsafe_binlog_innodb-master.opt
mysql-test/r/read_many_rows_innodb.result:
Rename: mysql-test/r/innodb-big.result -> mysql-test/r/read_many_rows_innodb.result
mysql-test/t/cache_innodb-master.opt:
Rename: mysql-test/t/innodb_cache-master.opt -> mysql-test/t/cache_innodb-master.opt
mysql-test/t/concurrent_innodb-master.opt:
Rename: mysql-test/t/innodb_concurrent-master.opt -> mysql-test/t/concurrent_innodb-master.opt
BitKeeper/deleted/.del-index_merge.result:
Delete: mysql-test/r/index_merge.result
BitKeeper/deleted/.del-index_merge_innodb.result:
Delete: mysql-test/r/index_merge_innodb.result
BitKeeper/deleted/.del-index_merge_innodb2.result:
Delete: mysql-test/r/index_merge_innodb2.result
BitKeeper/deleted/.del-index_merge_ror.result:
Delete: mysql-test/r/index_merge_ror.result
BitKeeper/deleted/.del-index_merge_ror_cpk.result:
Delete: mysql-test/r/index_merge_ror_cpk.result
mysql-test/r/index_merge_innodb.result:
BitKeeper file /home/matthias/Arbeit/mysql-5.1-engines/src-1/mysql-test/r/index_merge_innodb.result
mysql-test/t/index_merge_innodb.test:
BitKeeper file /home/matthias/Arbeit/mysql-5.1-engines/src-1/mysql-test/t/index_merge_innodb.test
mysql-test/t/index_merge_myisam.test:
BitKeeper file /home/matthias/Arbeit/mysql-5.1-engines/src-1/mysql-test/t/index_merge_myisam.test
mysql-test/include/concurrent.inc:
1. This file contains now the main testing code of the former t/innodb_concurrent.test.
2. It is now sourced by t/concurrent_innodb.test.
mysql-test/include/deadlock.inc:
1. This file contains now the main testing code of the former t/innodb-deadlock.test
2. It is now sourced by t/deadlock_innodb.test.
mysql-test/include/handler.inc:
1. This file contains now the main testing code of the former t/innodb_handler.test + t/handler.test.
2. It is now sourced by t/handler_myisam.test and t/handler_innodb.test.
mysql-test/include/index_merge1.inc:
1. This file contains now the main testing code of the former t/index_merge.test.
2. It is now sourced by t/index_merge_myisam.test.
mysql-test/include/index_merge2.inc:
1. This file contains now the main code of t/index_merge_innodb.test.
2. It is sourced by t/index_merge_myisam.test and t/index_merge_innodb.test.
mysql-test/include/index_merge_2sweeps.inc:
1. This file contains now the main code of the former t/index_merge_innodb2.test.
2. It is sourced by t/index_merge_myisam.test and t/index_merge_innodb.test.
mysql-test/include/index_merge_ror.inc:
1. This file contains now the main code of the former t/index_merge_ror.test.
2. It is sourced by t/index_merge_myisam.test.
mysql-test/include/index_merge_ror_cpk.inc:
1. This file contains now the main testing code of the former t/index_merge_ror_cpk.test.
2. It is now sourced by t/index_merge_myisam.test and t/index_merge_innodb.test.
mysql-test/include/mix1.inc:
1. This file contains now the main testing code of the t/innodb_mysql.test
2. The name mix1.inc was used because the test contains subtests for different fields.
3. It is sourced by t/innodb_mysql.test.
4. Fixes:
- Assign $other_engine_type instead of hardcoded MyISAM.
- improve comment
- remove redundant subtest
- analyze table t4 instead of wrong table t1
- remove not needed "eval set storage_engine = $engine_type;"
mysql-test/include/mix2.inc:
1. This file is a copy of the main testing code of the t/innodb.test
A copy has to be used, because t/innodb.test is to be maintained by INNOBASE only.
2. The name mix2.inc was used because the test contains subtests for different fields.
3. It is sourced by t/mix2_myisam.test.
4. Fixes:
- improved comment
- additional "eval SET SESSION STORAGE_ENGINE = $other_engine_type;" at beginning of tests
- assign $other_engine_type instead of hardcoded MyISAM or HEAP
- assign $other_engine_type where it is needed to preserve test logics
- correct logical bugs
- improve(extend) "checksum table" test
mysql-test/include/query_cache.inc:
1. This file contains now the main testing code of the former t/innodb_cache.test.
2. It is now sourced by t/cache_innodb.test
mysql-test/include/read_many_rows.inc:
1. This file contains now the main testing code of the former t/innodb_big.test.
2. It is now sourced by t/read_many_rows_innodb.test.
mysql-test/include/rowid_order.inc:
1. This file contains now the main testing code of t/rowid_order_innodb.test.
2. It is now sourced by t/rowid_order_innodb.test.
mysql-test/include/unsafe_binlog.inc:
1. This file contains now the main testing code of the former t/innodb_unsafe_binlog.test.
2. It is now sourced by t/unsafe_binlog_innodb.test.
mysql-test/r/cache_innodb.result:
Updated result
mysql-test/r/concurrent_innodb.result:
Updated result
mysql-test/r/deadlock_innodb.result:
Updated result
mysql-test/r/handler_innodb.result:
Updated result
mysql-test/r/handler_myisam.result:
Updated result
mysql-test/r/index_merge_myisam.result:
Updated result
mysql-test/r/innodb_mysql.result:
Updated result
mysql-test/r/mix2_myisam.result:
Updated result
mysql-test/r/rowid_order_innodb.result:
Updated result
mysql-test/r/unsafe_binlog_innodb.result:
Updated result
mysql-test/t/cache_innodb.test:
1. Renaming of t/innodb_cache.test to t/cache_innodb.test
2. Main code is now sourced from include/query_cache.inc.
mysql-test/t/concurrent_innodb.test:
1. Renaming of t/innodb_concurrent.test to t/concurrent_innodb.test
2. Main code is now sourced from include/concurrent.inc.
Attention: This test fails even in the old version. (BUG#21579).
--> added to t/disabled.def
mysql-test/t/deadlock_innodb.test:
1. Renaming of t/innodb_deadlock.test to t/deadlock_innodb.test
2. Main code is now sourced from include/deadlock.inc.
mysql-test/t/disabled.def:
Add the test concurrent_innodb because of
BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
mysql-test/t/handler_innodb.test:
1. Renaming of t/innodb_handler.test to t/handler_innodb.test
2. Main code is now sourced from include/handler.inc.
include/handler.inc = united code of former t/handler.test and t/innodb_handler.test
mysql-test/t/handler_myisam.test:
1. Renaming of t/handler.test to t/handler_myisam.test
2. Main code is now sourced from include/handler.inc.
include/handler.inc = united code of former t/handler.test and t/handler_innodb.test.
mysql-test/t/innodb_mysql.test:
1. Main code is now sourced from include/mix1.inc.
2. Test was not renamed because t/innodb.test refers to it.
mysql-test/t/mix2_myisam.test:
New test: MyISAM variant of mix2 ( = t/innodb.test)
mysql-test/t/read_many_rows_innodb.test:
1. Renaming of t/innodb_big.test to t/read_many_rows_innodb.test
2. Main code is now sourced from include/read_many_rows.inc.
mysql-test/t/rowid_order_innodb.test:
Main code is now sourced from t/rowid_order.inc.
mysql-test/t/unsafe_binlog_innodb.test:
1. Renaming of t/innodb_unsafe_binlog.test to t/unsafe_binlog_innodb.test
2. Main code is now sourced from include/unsafe_binlog.inc.
into govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
sql/ha_federated.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_insert.cc:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/ndbapi/ndberror.c:
Auto merged
mysql-test/r/auto_increment.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/create.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/federated.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/insert.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/insert_select.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/key.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/null.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/null_key.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/ps_2myisam.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/ps_3innodb.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/ps_4heap.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/ps_5merge.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/ps_6bdb.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/ps_7ndb.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/strict.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/view.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/r/warnings.result:
merge of 5.1-engines and 5.0-engines, hand merge
mysql-test/t/federated.test:
merge of 5.1-engines and 5.0-engines, hand merge
sql/ha_federated.h:
merge of 5.1-engines and 5.0-engines, hand merge
storage/csv/ha_tina.cc:
merge of 5.1-engines and 5.0-engines, hand merge
into govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
storage/innobase/row/row0mysql.c:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-runtine-merge
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sql_base.cc:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
client/mysql.cc:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysys/my_open.c:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
client/mysqltest.c:
Manual merge.
mysql-test/r/ps_1general.result:
Manual merge.
into lmy004.:/work/mysql-5.1-runtime
sql/sp.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
manual merge
mysql-test/t/sp.test:
manual merge
create function func() returns char(10) binary ...
is no more possible. This will be reenabled when
bug 2676 "DECLARE can't have COLLATE clause in stored procedure"
is fixed.
Fix after 2nd review
mysql-test/r/sp-error.result:
update result
mysql-test/r/sp.result:
update result
mysql-test/t/sp-error.test:
add a test case for bug#20701 BINARY keyword should be forbidden in stored procedures
mysql-test/t/sp.test:
Fix test case which uses binary for the return value of a function.
It's no more possible after fix for bug#20701
BINARY keyword should be forbidden in SP
Fix few glitches where ; is used instead of | . The delimiter is |
sql/sql_yacc.yy:
Fix for bug#20701 BINARY keyword should be forbidden in stored routines
create function func() returns char(10) binary ...
is no more possible. This will be reenabled when
bug 2676 "DECLARE can't have COLLATE clause in stored procedure"
is fixed
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-rt-merge
sql/handler.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
BitKeeper/deleted/.del-mysys.vcproj~40a49d09c4184822:
Auto merged
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/r/sp.result:
Manual merge. Place 5.0 test before 5.1 test.
mysql-test/t/sp.test:
Manual merge. Place 5.0 test before 5.1 test.
mysys/my_bitmap.c:
Manual merge.
scripts/make_binary_distribution.sh:
Manual merge.
sql/Makefile.am:
Manual merge.
sql/slave.cc:
Manual merge.
sql/sql_class.h:
Manual merge.
sql/sql_parse.cc:
Manual merge.
sql/sql_select.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
(this is not a fix to the bug, but simply to disable the test in
order to push a 5.0 to 5.1 merge)
This merge contains:
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
mysql-test/t/disabled.def:
BUG #21524 "'ps' test fails in --ps-protocol test AMD64 bit"
(this is not a fix to the bug, but simply to disable the test in
order to push a 5.0 to 5.1 merge)
into govinda.patg.net:/home/patg/mysql-build/mysql-5.1-5.0-merge2
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
BitKeeper/deleted/.del-libmysqld.dsp~78dc6a589e5a4149:
Auto merged
configure.in:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/merge.test:
Auto merged
sql/field.h:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
BitKeeper/deleted/.del-libmysqld.vcproj~a75d5b9a5967dea0:
Auto merged
BitKeeper/deleted/.del-libmysqld_ia64.dsp~578ab58d5f281d2a:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
Auto merged
BitKeeper/deleted/.del-mysqldemb.dsp~1baf8c0e59ee9f7e:
Auto merged
BitKeeper/deleted/.del-mysqldemb.vcproj~54c64d55ccc51a7c:
Auto merged
BitKeeper/deleted/.del-mysqldemb_ia64.dsp~c7f7d75d542393cd:
Auto merged
BitKeeper/deleted/.del-mysqldmax.dsp~5d213fe1c204142e:
Auto merged
BitKeeper/deleted/.del-mysqldmax_ia64.dsp~25006b7cc0725ad1:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
include/my_base.h:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
mysql-test/r/federated.result:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
mysql-test/t/federated.test:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
sql/field.cc:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
sql/ha_federated.cc:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
sql/handler.cc:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
tests/mysql_client_test.c:
Hand merge of conflicts (5.0-5.1 merge), second try
Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:
bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
The following procedure was not possible if max_sp_recursion_depth is 0
create procedure show_proc() show create procedure show_proc;
Actually there is no recursive call but the limit is checked.
Solved by temporarily increasing the thread's limit just before the fetch from cache
and decreasing after that.
mysql-test/r/sp.result:
update result
mysql-test/t/sp.test:
Test for bug #21416 SP: Recursion level higher than zero needed for non-recursive call
sql/sp.cc:
Increase the max_sp_recursion_depth temporarily for SHOW CREATE PROCEDURE call.
This call is in fact not recursive but is counted as such. Outcome, it will work
always but if max_sp_recursion_depth is reached we are going to cache one more
sp_head instance.
into mysql.com:/home/cps/mysql/devel/5.1-curs-bug
sql/ha_myisam.cc:
Auto merged
sql/handler.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/log_tables.result:
SCCS merged
mysql-test/t/log_tables.test:
SCCS merged
gets deadlocked when dropping w/ log on"
Log tables rely on concurrent insert machinery to add data.
This means that log tables are always opened and locked by
special (artificial) logger threads. Because of this, the thread
which tries to drop a log table starts to wait for the table
to be unlocked. Which will happen only if the log table is disabled.
Alike situation happens if one tries to alter a log table.
However in addition to the problem above, alter table calls
check_if_locking_is_allowed() routine for the engine. The
routine does not allow alter for the log tables. So, alter
doesn't start waiting forever for logs to be disabled, but
returns with an error.
Another problem is that not all engines could be used for
the log tables. That's because they need concurrent insert.
In this patch we:
(1) Explicitly disallow to drop/alter a log table if it
is currently used by the logger.
(2) Update MyISAM to support log tables
(3) Allow to drop log tables/alter log tables if log is
disabled
At the same time we (4) Disallow to alter log tables to
unsupported engine (after this patch CSV and MyISAM are
alowed)
Recommit with review fixes.
mysql-test/r/log_tables.result:
Update result file.
Note: there are warnings in result file. This is because of CSV
bug (Bug #21328). They should go away after it is fixed.
mysql-test/t/log_tables.test:
Add a test for the bug
sql/ha_myisam.cc:
Add log table handling to myisam: as log tables
use concurrent insert, they are typically
locked with TL_CONCURRERENT_INSERT lock. So,
disallow other threads to attempt locking of
the log tables in incompatible modes. Because
otherwise the threads will wait for the tables
to be unlocked forever.
sql/handler.cc:
Add a function to check if a table we're going to lock
is a log table and if the lock mode we want allowed
sql/handler.h:
Add a new function to check compatibility of the locking
sql/log.cc:
we shouldn't close the log table if and only
if this particular table is already closed
sql/log.h:
add new functions to check if a log is enabled
sql/share/errmsg.txt:
add new error messages
sql/sql_table.cc:
DROP and ALTER TABLE should not work on log
tables if the log tables are enabled
storage/csv/ha_tina.cc:
move function to check if the locking for the log
tables allowed to handler class, so that we can
reuse it in other engines.
storage/myisam/mi_extra.c:
add new ::extra() flag processing to myisam
storage/myisam/mi_open.c:
init log table flag
storage/myisam/mi_write.c:
update status after each write if it's a log table
storage/myisam/myisamdef.h:
Add new log table flag to myisam share.
We need it to distinguish between usual
and log tables, as for the log tables we
should provide concurrent insert in a
different way than for usual tables: we
want new rows to be immediately visible
to other threads.
Due to incorrect handling of FLUSH TABLES, log tables were marked for flush,
but not reopened. Later we started to wait for the log table to be closed
(disabled) after the flush. And as nobody disabled logs in concurrent treads,
the command lasted forever.
After internal consultations it was decided to skip logs during FLUSH TABLES.
The reasoning is that logging is done in the "log device", whatever it is
which is always active and controlled by FLUSH LOGS. So, to flush logs
one should use FLUSH LOGS, and not FLUSH TABLES.
mysql-test/r/log_tables.result:
update result file
mysql-test/t/log_tables.test:
add a test for the bug
sql/sql_base.cc:
Skip log tables during FLUSH TABLES
New test cases. Names with umlauts don't compare well on Windows.
mysql-test/r/alter_table.result:
Bug#18775 - Temporary table from alter table visible to other threads
New test results
mysql-test/r/backup.result:
Bug#18775 - Temporary table from alter table visible to other threads
New test results
mysql-test/t/alter_table.test:
Bug#18775 - Temporary table from alter table visible to other threads
New test case. Names with umlauts don't compare well on Windows.
mysql-test/t/backup.test:
Bug#18775 - Temporary table from alter table visible to other threads
New test case. Names with umlauts don't compare well on Windows.
into chilla.local:/home/mydev/mysql-5.1-bug18775
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql/sql_db.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Manual merge
Continued implementation of WL#1324 (table name to filename encoding)
The intermediate (not temporary) files of the new table
during ALTER TABLE was visible for SHOW TABLES. These
intermediate files are copies of the original table with
the changes done by ALTER TABLE. After all the data is
copied over from the original table, these files are renamed
to the original tables file names. So they are not temporary
files. They persist after ALTER TABLE, but just with another
name.
In 5.0 the intermediate files are invisible for SHOW TABLES
because all file names beginning with "#sql" were suppressed.
This failed since 5.1.6 because even temporary table names were
converted when making file names from them. The prefix became
converted to "@0023sql". Converting the prefix during SHOW TABLES
would suppress the listing of user tables that start with "#sql".
The solution of the problem is to continue the implementation of
the table name to file name conversion feature. One requirement
is to suppress the conversion for temporary table names.
This change is straightforward for real temporary tables as there
is a function that creates temporary file names.
But the generated path names are located in TMPDIR and have no
relation to the internal table name. This cannot be used for
ALTER TABLE. Its intermediate files need to be in the same
directory as the old table files. And it is necessary to be
able to deduce the same path from the same table name repeatedly.
Consequently the intermediate table files must be handled like normal
tables. Their internal names shall start with tmp_file_prefix
(#sql) and they shall not be converted like normal table names.
I added a flags parameter to all relevant functions that are
called from ALTER TABLE. It is used to suppress the conversion
for the intermediate table files.
The outcome is that the suppression of #sql in SHOW TABLES
works again. It does not suppress user tables as these are
converted to @0023sql on file level.
This patch does also fix ALTER TABLE ... RENAME, which could not
rename a table with non-ASCII characters in its name.
It does also fix the problem that a user could create a table like
`#sql-xxxx-yyyy`, where xxxx is mysqld's pid and yyyy is the thread
ID of some other thread, which prevented this thread from running
ALTER TABLE.
Some of the above problems are mentioned in Bug 1405, which can
be closed with this patch.
This patch does also contain some minor fixes for other forgotten
conversions. Still known problems are reported as bugs 21370,
21373, and 21387.
mysql-test/r/alter_table.result:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added test results.
mysql-test/r/backup.result:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added test results.
mysql-test/r/repair.result:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added test results.
mysql-test/t/alter_table.test:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added test cases.
mysql-test/t/backup.test:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added test cases.
mysql-test/t/repair.test:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added a test case.
sql/ha_myisam.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added missing table name mapping calls to backup() and restore().
sql/ha_myisammrg.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/ha_ndbcluster.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/ha_ndbcluster_binlog.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/ha_ndbcluster_binlog.h:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Removed unnecessary check for wrong temp file prefix.
sql/mysql_priv.h:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Extended quick_rm_table(), mysql_rename_table(), and
build_table_filename() by an flags argument, which can indicate
temporary table names that should not be converted.
Added symbolic flag values.
sql/sql_acl.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_base.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Fixed a comment.
Added DBUG calls.
sql/sql_db.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_delete.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_insert.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_partition.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_rename.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_show.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Reverted the former fix for this bug. tmp_file_prefix is now used
verbatim in the comparison of file names.
sql/sql_table.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added a check for a tmp_file_prefix file name to
filename_to_tablename(). These names are now accepted without
conversion.
Extended quick_rm_table(), mysql_rename_table(), and
build_table_filename() by an flags argument, which can indicate
temporary table names that should not be converted.
Removed the table to file name conversion from
build_tmptable_filename().
Disabled REPAIR TABLE ... USE_FRM for temporary tables.
Added the forgotten conversion to mysql_alter_table() for the case
of ALTER TABLE ... RENAME.
Added comments and DBUG calls.
sql/sql_trigger.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/sql_view.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Added an zero argument for the new 'flags' parameter.
sql/table.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Replaced a literal ".frm" by reg_ext.
Added DBUG calls.
storage/innobase/row/row0mysql.c:
Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Changed back the encoded temp file prefix to #sql.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/t/sp.test:
Manual merge
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/sql_view.cc:
SCCS merged
- make the client to respect the server-side
no_backslash_escapes option and disable the
special meaning of backslash also at client side.
mysql-test/r/mysql_client.result:
Bug #20103: Escaping with backslash does not work
- test case
mysql-test/t/mysql_client.test:
Bug #20103: Escaping with backslash does not work
- test case
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/binlog_row_blackhole.result:
Auto merged
mysql-test/r/binlog_stm_blackhole.result:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_compress.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_system.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/partition_pruning.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/rpl_get_lock.result:
Auto merged
mysql-test/r/rpl_master_pos_wait.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/partition_pruning.test:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.h:
Auto merged
into rakia.(none):/home/kgeorge/mysql/autopush/B11551-5.0-opt
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_view.cc:
Auto merged
made DROP VIEW to continue on error and report an aggregated error
at its end. This makes it similar to DROP TABLE.
mysql-test/r/view.result:
Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
- test case
- changed error message
mysql-test/t/view.test:
Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
- test case
sql/sql_view.cc:
Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
- made DROP VIEW to continue on error and report an aggregated error
When executing ALTER TABLE all the attributes of the view were overwritten.
This is contrary to the user's expectations.
So some of the view attributes are preserved now : namely security and
algorithm. This means that if they are not specified in ALTER VIEW
their values are preserved from CREATE VIEW instead of being defaulted.
mysql-test/r/view.result:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- test suite
mysql-test/t/view.test:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- test suite
sql/sql_lex.h:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- must make create_view_suid a tristate : on/off/unspecified
sql/sql_view.cc:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- open the view to get it's attributes and put then as defaults
for ALTER VIEW
sql/sql_yacc.yy:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- must make create_view_suid a tristate : on/off/unspecified
sql/table.h:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- must make create_view_suid a tristate : on/off/unspecified
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
Auto merged
BitKeeper/deleted/.del-mysqldump.dsp~a8bd23547d3fc27e:
Auto merged
BitKeeper/deleted/.del-mysqldump_ia64.dsp~a2aabe898be35b31:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/time.cc:
Auto merged
storage/ndb/test/ndbapi/Makefile.am:
Auto merged
strings/decimal.c:
Auto merged
mysql-test/r/analyse.result:
Manual merge
mysql-test/r/bigint.result:
Manual merge
mysql-test/r/create.result:
Manual merge
mysql-test/r/information_schema.result:
Manual merge
mysql-test/r/ps_2myisam.result:
Manual merge
mysql-test/r/ps_3innodb.result:
Manual merge
mysql-test/r/ps_4heap.result:
Manual merge
mysql-test/r/ps_5merge.result:
Manual merge
mysql-test/r/ps_6bdb.result:
Manual merge
mysql-test/r/rpl_insert_id.result:
Manual merge
mysql-test/r/select.result:
Manual merge
mysql-test/r/sp.result:
Manual merge
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/information_schema.test:
Manual merge
mysql-test/t/rpl_insert_id.test:
Manual merge
sql/field.h:
Manual merge
sql/item.cc:
Manual merge
sql/item.h:
Manual merge
sql/item_strfunc.h:
Manual merge
sql/item_sum.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/share/errmsg.txt:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_select.cc:
Manual merge
into mysql.com:/home/psergey/mysql-5.1-bug14940-r4
mysql-test/r/partition_pruning.result:
Auto merged
mysql-test/t/partition_pruning.test:
Auto merged
sql/sql_select.cc:
Auto merged
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
mysql-test/r/partition_pruning.result:
Auto merged
mysql-test/t/partition_pruning.test:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_select.cc:
Auto merged