Below is the list of changes that have just been committed into a local
maria repository of monty. When monty does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-03-04 12:52:29+02:00, monty@stripped +5 -0
Fixed crashing bug when starting mysqld with --dbug
Fixed crash when using other maria block size than 8192
Fixed bug that caused tables to be reported as crashed if maria_log_control was deleted
sql/mysqld.cc@stripped, 2008-03-04 12:52:23+02:00, monty@stripped +4 -4
Don't give warning in case of timeout for pthread_cond_timedwait
Fixed crashing bug when starting mysqld with --dbug
storage/maria/ha_maria.cc@stripped, 2008-03-04 12:52:24+02:00, monty@stripped +1 -1
Fixed crash when using other block size than 8192 (Crash happend later in bitmap page
handling)
storage/maria/ma_locking.c@stripped, 2008-03-04 12:52:24+02:00, monty@stripped +6 -4
When we write a new uuid for a zerofilled file, also update the lsn's
storage/maria/ma_open.c@stripped, 2008-03-04 12:52:24+02:00, monty@stripped +7 -2
Don't update lsn on open. Wait until first time file is changed
Fixed bug that caused tables to be reported as crashed if maria_log_control was
deleted
strings/strmake.c@stripped, 2008-03-04 12:52:24+02:00, monty@stripped +29 -17
Fixed warnings for strings without end 0 when running under valgrind.
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2008-02-13 21:27:05 +02:00
+++ b/sql/mysqld.cc 2008-03-04 12:52:23 +02:00
@@ -800,7 +800,7 @@ static void close_connections(void)
break;
}
#ifdef EXTRA_DEBUG
- if (error != 0 && !count++)
+ if (error != 0 && error != ETIMEDOUT && !count++)
sql_print_error("Got error %d from pthread_cond_timedwait",error);
#endif
close_server_sock();
@@ -7445,15 +7445,15 @@ mysqld_get_one_option(int optid,
{
switch(optid) {
case '#':
- if (*argument == '0')
+ DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
+ if (argument[0] == '0' && !argument[1])
{
DEBUGGER_OFF;
break;
}
DEBUGGER_ON;
- if (*argument == '1')
+ if (argument[1] == '0' && !argument[1])
break;
- DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
opt_endinfo=1; /* unireg: memory allocation */
break;
case 'a':
diff -Nrup a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
--- a/storage/maria/ha_maria.cc 2008-02-20 02:47:04 +02:00
+++ b/storage/maria/ha_maria.cc 2008-03-04 12:52:24 +02:00
@@ -2759,7 +2759,7 @@ static int ha_maria_init(void *p)
res= maria_init() || ma_control_file_create_or_open() ||
!init_pagecache(maria_pagecache,
(size_t) pagecache_buffer_size, pagecache_division_limit,
- pagecache_age_threshold, MARIA_KEY_BLOCK_LENGTH, 0) ||
+ pagecache_age_threshold, maria_block_size, 0) ||
!init_pagecache(maria_log_pagecache,
TRANSLOG_PAGECACHE_SIZE, 0, 0,
TRANSLOG_PAGE_SIZE, 0) ||
diff -Nrup a/storage/maria/ma_locking.c b/storage/maria/ma_locking.c
--- a/storage/maria/ma_locking.c 2008-01-18 00:59:06 +02:00
+++ b/storage/maria/ma_locking.c 2008-03-04 12:52:24 +02:00
@@ -488,10 +488,10 @@ int _ma_test_if_changed(register MARIA_H
/*
- Put a mark in the .MYI file that someone is updating the table
+ Put a mark in the .MAI file that someone is updating the table
DOCUMENTATION
- state.open_count in the .MYI file is used the following way:
+ state.open_count in the .MAI file is used the following way:
- For the first change of the .MYI file in this process open_count is
incremented by _ma_mark_file_changed(). (We have a write lock on the file
when this happens)
@@ -505,7 +505,6 @@ int _ma_test_if_changed(register MARIA_H
open_count is not maintained on disk for transactional or temporary tables.
*/
-
int _ma_mark_file_changed(MARIA_HA *info)
{
uchar buff[3];
@@ -541,7 +540,10 @@ int _ma_mark_file_changed(MARIA_HA *info
!(share->state.changed & STATE_NOT_MOVABLE))
{
/* Lock table to current installation */
- if (_ma_set_uuid(info, 0))
+ if (_ma_set_uuid(info, 0) ||
+ (share->state.create_rename_lsn == LSN_REPAIRED_BY_MARIA_CHK &&
+ _ma_update_state_lsns_sub(share, translog_get_horizon(),
+ TRUE, TRUE)))
DBUG_RETURN(1);
share->state.changed|= STATE_NOT_MOVABLE;
}
diff -Nrup a/storage/maria/ma_open.c b/storage/maria/ma_open.c
--- a/storage/maria/ma_open.c 2008-02-21 02:45:47 +02:00
+++ b/storage/maria/ma_open.c 2008-03-04 12:52:24 +02:00
@@ -396,8 +396,12 @@ MARIA_HA *maria_open(const char *name, i
goto err;
}
+ /*
+ We can ignore testing uuid if STATE_NOT_MOVABLE is set, as in this
+ case the uuid will be set in _ma_mark_file_changed()
+ */
if ((share->state.changed & STATE_NOT_MOVABLE) &&
- share->now_transactional &&
+ share->base.born_transactional &&
!(open_flags & HA_OPEN_IGNORE_MOVED_STATE) &&
memcmp(share->base.uuid, maria_uuid, MY_UUID_SIZE))
{
@@ -654,7 +658,8 @@ MARIA_HA *maria_open(const char *name, i
import into the server. It starts its existence (from the point of
view of the server, including server's recovery) now.
*/
- if ((open_flags & HA_OPEN_FROM_SQL_LAYER) || maria_in_recovery)
+ if (((open_flags & HA_OPEN_FROM_SQL_LAYER) &&
+ (share->state.changed & STATE_NOT_MOVABLE)) || maria_in_recovery)
_ma_update_state_lsns_sub(share, translog_get_horizon(),
TRUE, TRUE);
}
diff -Nrup a/strings/strmake.c b/strings/strmake.c
--- a/strings/strmake.c 2007-12-17 11:43:18 +02:00
+++ b/strings/strmake.c 2008-03-04 12:52:24 +02:00
@@ -29,26 +29,38 @@
char *strmake(register char *dst, register const char *src, size_t length)
{
-#ifdef EXTRA_DEBUG
- /*
- 'length' is the maximum length of the string; the buffer needs
- to be one character larger to accomodate the terminating '\0'.
- This is easy to get wrong, so we make sure we write to the
- entire length of the buffer to identify incorrect buffer-sizes.
- We only initialise the "unused" part of the buffer here, a) for
- efficiency, and b) because dst==src is allowed, so initialising
- the entire buffer would overwrite the source-string. Also, we
- write a character rather than '\0' as this makes spotting these
- problems in the results easier.
- */
- uint n= strlen(src) + 1;
- if (n <= length)
- memset(dst + n, (int) 'Z', length - n + 1);
-#endif
-
while (length--)
+ {
if (! (*dst++ = *src++))
+ {
+#ifdef EXTRA_DEBUG
+ /*
+ 'length' is the maximum length of the string; the buffer needs
+ to be one character larger to accommodate the terminating
+ '\0'. This is easy to get wrong, so we make sure we write to
+ the entire length of the buffer to identify incorrect
+ buffer-sizes. We only initialism the "unused" part of the
+ buffer here, a) for efficiency, and b) because dst==src is
+ allowed, so initializing the entire buffer would overwrite the
+ source-string. Also, we write a character rather than '\0' as
+ this makes spotting these problems in the results easier.
+
+ If we are using purify/valgrind, we only set one character at
+ end to be able to detect also wrong accesses after the end of
+ dst.
+ */
+ if (length)
+ {
+#ifdef HAVE_purify
+ dst[length-1]= 'Z';
+#else
+ bfill(dst, length-1, (int) 'Z');
+#endif /* HAVE_purify */
+ }
+#endif /* EXTRA_DEBUG */
return dst-1;
+ }
+ }
*dst=0;
return dst;
}
| Thread |
|---|
| • bk commit into maria tree (monty:1.2613) | monty | 4 Mar |