Commit 8116e16e authored by unknown's avatar unknown

ignore 'moved' state in maria_open() if requested


storage/maria/ma_pagecache.c:
  Change mode to -rw-rw-r--
storage/maria/ma_open.c:
  ignore 'moved' state if requested
storage/maria/maria_pack.c:
  ignore 'moved' state in maria_open()
storage/maria/unittest/ma_test_all-t:
  avoid a warning if $output is undefined
parent b8416bce
......@@ -396,7 +396,9 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
goto err;
}
if (memcmp(share->base.uuid, maria_uuid, MY_UUID_SIZE))
if (share->state.changed & STATE_NOT_MOVABLE &&
!(open_flags & HA_OPEN_IGNORE_MOVED_STATE) &&
memcmp(share->base.uuid, maria_uuid, MY_UUID_SIZE))
{
if (open_flags & HA_OPEN_FOR_REPAIR)
share->state.changed|= STATE_MOVED;
......
File mode changed from 100755 to 100644
......@@ -41,6 +41,9 @@
#define MAX_NONMAPPED_INSERTS 1000
#define MARIA_MAX_TREE_LEVELS 32
/* maria_open() flag, specific for maria_pack */
#define HA_OPEN_IGNORE_MOVED_STATE (1U << 30)
struct st_transaction;
/* undef map from my_nosys; We need test-if-disk full */
......
......@@ -406,7 +406,7 @@ static MARIA_HA *open_isam_file(char *name,int mode)
MARIA_SHARE *share;
DBUG_ENTER("open_isam_file");
if (!(isam_file=maria_open(name,mode,
if (!(isam_file=maria_open(name, mode, HA_OPEN_IGNORE_MOVED_STATE |
(opt_wait ? HA_OPEN_WAIT_IF_LOCKED :
HA_OPEN_ABORT_IF_LOCKED))))
{
......
......@@ -461,7 +461,7 @@ sub ok
print "not ok";
print " ]" if ($verbose);
print "\n";
if ($verbose && length($output))
if ($verbose && defined($output) && length($output))
{
print "$output\n";
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment