diff options
author | unknown <guilhem@gbichot4.local> | 2007-08-09 15:00:32 +0200 |
---|---|---|
committer | unknown <guilhem@gbichot4.local> | 2007-08-09 15:00:32 +0200 |
commit | 0d301ee822c45fa6b8e1ff0e31e7ec3308c9747f (patch) | |
tree | 15f575ff8d17bb0e00ecee41cc70f14f74e60fc6 /storage | |
parent | 95e2558f8eed4f23179b31d0b59f03bb8af05a12 (diff) | |
download | mariadb-git-0d301ee822c45fa6b8e1ff0e31e7ec3308c9747f.tar.gz |
* tests which use MERGE or INSERT DELAYED should run only
with engines which support that
* temporarily adding option --global-subst to mysqltest so that
the full testsuite can be run using Maria tables without failing
on trivial differences (like diff in the engine clause of
SHOW CREATE TABLE)
* using recognizable tags for todos of the Maria team
client/mysqltest.c:
temporarily adding option --global-subst: its argument is X,Y.
It replaces all occurrences of X by Y into mysqltest's result
before the comparison with the expected result is done.
This serves for when a test is run with --default-storage-engine=X
where X is not MyISAM: tests using SHOW CREATE TABLE will always fail
because SHOW CREATE TABLE prints X instead of MyISAM. With
--global-subst=X,MyISAM , such trivial differences are eliminated and
test may be reported as passing.
For example, --global-subst=MARIA,MyISAM
This is not good enough for merging into main trees! just for running
many tests and finding bugs now!
mysql-test/mysql-test-run.pl:
new option --mysqltest to pass options to mysqltest (like we have
--mysqld). Used for example like this:
./mtr --mysqltest=--global-subst=MARIA,MyISAM
mysql-test/r/merge.result:
update
mysql-test/t/delayed.test:
run test only with engines which support INSERT DELAYED
mysql-test/t/merge.test:
run test only with MyISAM tables, as they are required by MERGE
sql/sql_delete.cc:
recognizable tag
sql/table.cc:
recognizable tag
storage/maria/ha_maria.cc:
recognizable tag
storage/maria/ma_check.c:
recognizable tag
storage/maria/ma_create.c:
recognizable tag
Diffstat (limited to 'storage')
-rw-r--r-- | storage/maria/ha_maria.cc | 6 | ||||
-rw-r--r-- | storage/maria/ma_check.c | 32 | ||||
-rw-r--r-- | storage/maria/ma_create.c | 3 |
3 files changed, 22 insertions, 19 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index cfc8e5fc07a..99b92c1bcfc 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -746,7 +746,8 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked) if (!(file= maria_open(name, mode, test_if_locked | HA_OPEN_FROM_SQL_LAYER))) return (my_errno ? my_errno : -1); - /* + /** + @todo ASK_MONTY This is a protection for the case of a frm and MAI containing incompatible table definitions (as in BUG#25908). This was merged from MyISAM. But it breaks maria.test and ps_maria.test ("incorrect key file") if the @@ -2160,7 +2161,8 @@ int ha_maria::create(const char *name, register TABLE *table_arg, create_info.data_file_name= ha_create_info->data_file_name; create_info.index_file_name= ha_create_info->index_file_name; #ifdef ASK_MONTY - /* + /** + @todo ASK_MONTY Where "transactional" in the frm and in the engine can go out of sync. Don't we want to do, after the setting, this test: if (!create_info.transactional && diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index e15c9405e23..a68a21d0180 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -2047,9 +2047,10 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info, } _ma_reset_status(sort_info.new_info); #ifdef ASK_MONTY /* cf maria_create() */ - /* - without this call, a REPAIR on an empty table leaves the data file of - size 0, which sounds reasonable. + /** + @todo ASK_MONTY + without this call, a REPAIR on an empty table leaves the data file of + size 0, which sounds reasonable. */ if (_ma_initialize_data_file(sort_info.new_info->s, new_file)) goto err; @@ -2272,20 +2273,19 @@ err: llstr(sort_param.start_recpos,llbuff)); if (sort_info.new_info && sort_info.new_info != sort_info.info) { -#ifdef ASK_MONTY - /* - grepping for "dfile.file=" - shows several places (ma_check.c, ma_panic.c, ma_extra.c) where we - modify dfile.file without modifying share->bitmap.file.file; those - sound like bugs because the two variables are normally copies of each - other in BLOCK_RECORD (and in other record formats it does not hurt to - change the unused share->bitmap.file.file). - It does matter, because if we close dfile.file, set dfile.file to -1, - but leave bitmap.file.file to its positive value, maria_close() will - close a file which it is not allowed to (maybe even a file in another - engine or mysqld!). + /** + @todo ASK_MONTY + grepping for "dfile.file=" + shows several places (ma_check.c, ma_panic.c, ma_extra.c) where we + modify dfile.file without modifying share->bitmap.file.file; those + sound like bugs because the two variables are normally copies of each + other in BLOCK_RECORD (and in other record formats it does not hurt + to change the unused share->bitmap.file.file). + It does matter, because if we close dfile.file, set dfile.file to -1, + but leave bitmap.file.file to its positive value, maria_close() will + close a file which it is not allowed to (maybe even a file in another + engine or mysqld!). */ -#endif sort_info.new_info->dfile.file= -1; maria_close(sort_info.new_info); } diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index b3aef7c544c..f944b9d8bf7 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -1041,7 +1041,8 @@ int maria_create(const char *name, enum data_file_type datafile_type, goto err; errpos=3; - /* + /** + @todo ASK_MONTY QQ: this sets data_file_length from 0 to 8192, but we wrote the state already to the index file (because: - log record is built from index header so state must be written before |