diff options
author | unknown <monty@mysql.com/narttu.mysql.fi> | 2008-01-12 13:16:55 +0200 |
---|---|---|
committer | unknown <monty@mysql.com/narttu.mysql.fi> | 2008-01-12 13:16:55 +0200 |
commit | 978f3e3c3b2646a1f5328dffdb342c739a80b169 (patch) | |
tree | 6a941607536091e967bfaf7487e16803c7826d95 | |
parent | e689fbc4582de1b5f81cb69d98f5fe54b7064db1 (diff) | |
download | mariadb-git-978f3e3c3b2646a1f5328dffdb342c739a80b169.tar.gz |
Fixes to bugs and compiler warnings detected by pushbuild
Don't compare uuid's on maria_open() if table is not transactional
Fixed that my_microtime() works on windows (patch added from 5.1)
mysql-test/r/create.result:
Portability fix
mysql-test/t/create.test:
Portability fix
mysql-test/t/maria.test:
Remove warnings, to make test portable to windows
mysys/my_getsystime.c:
Add missed merge from 5.1
This fixes that timing works on windows and fixes that that failed becasuse slow_query_log didn't get any queries
storage/maria/ma_check.c:
Removed not needed setting of variable
storage/maria/ma_loghandler.c:
Fixed compiler warnings
storage/maria/ma_open.c:
Don't compare uuid's if table is not transactional
KNOWN_BUGS.txt:
New BitKeeper file ``KNOWN_BUGS.txt''
-rw-r--r-- | KNOWN_BUGS.txt | 79 | ||||
-rw-r--r-- | mysql-test/r/create.result | 2 | ||||
-rw-r--r-- | mysql-test/t/create.test | 2 | ||||
-rw-r--r-- | mysql-test/t/maria.test | 5 | ||||
-rw-r--r-- | mysys/my_getsystime.c | 46 | ||||
-rw-r--r-- | storage/maria/ma_check.c | 1 | ||||
-rw-r--r-- | storage/maria/ma_loghandler.c | 4 | ||||
-rw-r--r-- | storage/maria/ma_open.c | 3 |
8 files changed, 117 insertions, 25 deletions
diff --git a/KNOWN_BUGS.txt b/KNOWN_BUGS.txt new file mode 100644 index 00000000000..a9dd851ea78 --- /dev/null +++ b/KNOWN_BUGS.txt @@ -0,0 +1,79 @@ +This file should contain all know fatal bugs in the Maria storage +engine for the last source or binary release. Minor bugs, extensions +and feature request and bugs found since this release can be find in the +MySQL bugs databases at: http://bugs.mysql.com/ + +There shouldn't normally be any bugs that affects normal operations in +any Maria release. Still, there are always exceptions and edge cases +and that's what this file is for. + +For the first few Alpha releases of Maria there may be some edge cases +that crashes during recovery; We don't like that but we think it's +better to get the Maria alpha out early to get things tested and get +more developers on the code early than wait until these are fixed. We +do however think that the bugs are not seriously enough to stop anyone +from starting to test and even use Maria for real (as long as they are +prepared to upgrade to next MySQL-Maria release ASAP). + +If you have found a bug that is not listed here, please add it to +http://bugs.mysql.com/ so that we can either fix it for next release +or in the worst case add it here for others to know! + + +Known bugs that are planned to be fixed before next minor release +================================================================= + +- If mysqld crashed or is killed during REPAIR or OPTIMIZE, Maria will not + be able to automaticly repair the table again; You must manually run + REPAIR on the table again after mysqld is started. + +- If mysqld crashes during batch insert into an empty table, + (This includes LOAD DATA INFILE, SELECT ... INSERT and INSERT (many rows)) + Maria repair may not be able to recreate the empty table. In this case + You must manually run either REPAIR TABLE or TRUNCATE to fix the table. + +- If the log files are damaged or inconsistent, Maria may fail to start. + We should fix that if this happens and mysqld is restarted (thanks to + mysqld_safe, instance manager or other script) it should disregard the + old logs, start anyway and automaticly repair any tables that was found + to be crashed on open. + Temporary fix is to remove or maria_log.???????? files from the data + directory, restart mysqld and run CHECK TABLE / REPAIR TABLE or + mysqlcheck on your Maria tables + + +Known bugs that are planned to be fixed before Beta +=================================================== + +- If we get a write failure on disk (disk full or disk error) for the + log, we should stop all usage of transactional tables and mark all + transactional tables that are changed as crashed. + For the moment, if this happens, you have to take down mysqld, + remove all logs, restart mysqld and repair your tables. + + If you get the related error: + "Disk is full writing '/usr/local/mysql/var/maria_log.????????' (Errcode: 28) + Waiting for someone to free space..." + you should either free disk space, in which Maria will continue as before + or kill mysqld, remove logs and repair tables. + + +Missing features that is planned to fix before Beta +=================================================== + +- We will add an maria-recover option to automaticly repair any + crashed tables on open. (This is needed for not transactional tables + and also in edge cases for transactional tables when the table + crashed because of a bug in MySQL or Maria code) +- Multiple concurrent inserts & multiple concurrent readers at same time + with full MVCC control. Note that UPDATE and DELETE will still be + blocking (as with MyISAM) +- COUNT(*) and TABLE CHECKSUM under MVCC (ie, they are instant and kept up + to date even with multiple inserter) +- Recovery of fulltext and GIS indexes. + + +Features planned for future releases +==================================== + +http://forge.mysql.com/worklog/ diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 2a5b2e92bb2..73731ead70b 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1717,7 +1717,7 @@ t1 CREATE TABLE `t1` ( `TIME` bigint(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, `INFO` longtext -) ENGINE=MARIA DEFAULT CHARSET=utf8 +) DEFAULT CHARSET=utf8 drop table t1; create temporary table t1 like information_schema.processlist; show create table t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 60540e0066a..e491832ebac 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1332,7 +1332,7 @@ drop function f1; # Bug#25629 CREATE TABLE LIKE does not work with INFORMATION_SCHEMA # create table t1 like information_schema.processlist; ---replace_result ENGINE=MyISAM "" ENGINE=Maria "" " PAGE_CHECKSUM=1" "" +--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" show create table t1; drop table t1; create temporary table t1 like information_schema.processlist; diff --git a/mysql-test/t/maria.test b/mysql-test/t/maria.test index 9654b5c76ec..120f5178a4c 100644 --- a/mysql-test/t/maria.test +++ b/mysql-test/t/maria.test @@ -989,7 +989,9 @@ connect (session2,localhost,root,,); connection session1; disable_query_log; +disable_warnings; eval create temporary table t1 (a int) data directory="$MYSQLTEST_VARDIR/tmp" select 9 a; +enable_warnings; enable_query_log; disable_result_log; show create table t1; @@ -997,7 +999,10 @@ enable_result_log; connection session2; disable_query_log; + +disable_warnings; eval create temporary table t1 (a int) data directory="$MYSQLTEST_VARDIR/tmp" select 99 a; +enable_warnings; enable_query_log; disable_result_log; show create table t1; diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index 43bb6c08af9..9ccbd3433be 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -35,9 +35,9 @@ ulonglong my_getsystime() if (query_performance_frequency) { QueryPerformanceCounter(&t_cnt); - return (t_cnt.QuadPart / query_performance_frequency * 10000000+ - t_cnt.QuadPart % query_performance_frequency * 10000000/ - query_performance_frequency+query_performance_offset); + return ((t_cnt.QuadPart / query_performance_frequency * 10000000) + + (t_cnt.QuadPart % query_performance_frequency * 10000000 / + query_performance_frequency) + query_performance_offset); } return 0; #elif defined(__NETWARE__) @@ -108,16 +108,20 @@ ulonglong my_micro_time() if (query_performance_frequency) { QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - newtime/= (query_performance_frequency * 1000000); + newtime= ((new_time / query_performance_frequency * 10000000) + + (new_time % query_performance_frequency * 10000000 / + query_performance_frequency)); } else - newtime= (GetTickCount() * 1000); /* GetTickCount only returns milliseconds */ + newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec. */ return newtime; #elif defined(HAVE_GETHRTIME) return gethrtime()/1000; #else struct timeval t; - /* The following loop is here because gettimeofday may fail on some systems */ + /* + The following loop is here because gettimeofday may fail on some systems + */ while (gettimeofday(&t, NULL) != 0) {} newtime= (ulonglong)t.tv_sec * 1000000 + t.tv_usec; @@ -131,18 +135,18 @@ ulonglong my_micro_time() SYNOPSIS my_micro_time_and_time() - time_arg Will be set to seconds since epoch (00:00:00 UTC, January 1, - 1970) + time_arg Will be set to seconds since epoch (00:00:00 UTC, + January 1, 1970) NOTES This function is to be useful when we need both the time and microtime. - For example in MySQL this is used to get the query time start of a query and - to measure the time of a query (for the slow query log) + For example in MySQL this is used to get the query time start of a query + and to measure the time of a query (for the slow query log) IMPLEMENTATION Value of time is as in time() call. - Value of microtime is same as my_micro_time(), which may be totally unrealated - to time() + Value of microtime is same as my_micro_time(), which may be totally + unrealated to time() RETURN Value in microseconds from some undefined point in time @@ -157,16 +161,18 @@ ulonglong my_micro_time_and_time(time_t *time_arg) if (query_performance_frequency) { QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - newtime/= (query_performance_frequency * 1000000); + newtime= ((new_time / query_performance_frequency * 10000000) + + (new_time % query_performance_frequency * 10000000 / + query_performance_frequency)); } else - newtime= (GetTickCount() * 1000); /* GetTickCount only returns milliseconds */ + newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec. */ (void) time(time_arg); return newtime; #elif defined(HAVE_GETHRTIME) /* - Solaris has a very slow time() call. We optimize this by using the very fast - gethrtime() call and only calling time() every 1/2 second + Solaris has a very slow time() call. We optimize this by using the very + fast gethrtime() call and only calling time() every 1/2 second */ static hrtime_t prev_gethrtime= 0; static time_t cur_time= 0; @@ -184,7 +190,9 @@ ulonglong my_micro_time_and_time(time_t *time_arg) return cur_gethrtime/1000; #else struct timeval t; - /* The following loop is here because gettimeofday may fail on some systems */ + /* + The following loop is here because gettimeofday may fail on some systems + */ while (gettimeofday(&t, NULL) != 0) {} *time_arg= t.tv_sec; @@ -203,8 +211,8 @@ ulonglong my_micro_time_and_time(time_t *time_arg) NOTES This function returns the current time. The microtime argument is only used - if my_micro_time() uses a function that can safely be converted to the current - time. + if my_micro_time() uses a function that can safely be converted to the + current time. RETURN current time diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 5722b982964..34205246615 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -5907,7 +5907,6 @@ static my_bool create_new_data_handle(MARIA_SORT_PARAM *param, File new_file) HA_OPEN_COPY | HA_OPEN_FOR_REPAIR))) DBUG_RETURN(1); - info->s->now_transactional= 0; new_info= sort_info->new_info; _ma_bitmap_set_pagecache_callbacks(&new_info->s->bitmap.file, new_info->s); diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index 5b91ca9fa4a..090202ffebb 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -2235,7 +2235,7 @@ static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset) DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN")); rec_len= translog_variable_record_1group_decode_len(&ptr); chunk_len= uint2korr(ptr); - header_len= (ptr -start) + 2; + header_len= (uint16) (ptr -start) + 2; DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u", (ulong) rec_len, (uint) chunk_len, (uint) header_len)); if (chunk_len) @@ -2998,7 +2998,7 @@ static uint16 translog_get_chunk_header_length(uchar *chunk) DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN")); rec_len= translog_variable_record_1group_decode_len(&ptr); chunk_len= uint2korr(ptr); - header_len= (ptr - start) +2; + header_len= (uint16) (ptr - start) +2; DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u", (ulong) rec_len, (uint) chunk_len, (uint) header_len)); if (chunk_len) diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c index 97f0b57064e..0d72737f2d7 100644 --- a/storage/maria/ma_open.c +++ b/storage/maria/ma_open.c @@ -396,7 +396,8 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags) goto err; } - if (share->state.changed & STATE_NOT_MOVABLE && + if ((share->state.changed & STATE_NOT_MOVABLE) && + share->now_transactional && !(open_flags & HA_OPEN_IGNORE_MOVED_STATE) && memcmp(share->base.uuid, maria_uuid, MY_UUID_SIZE)) { |