maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08049
Re: MDEV-7273 - 10.1 fails to start up during tc_log initializations on PPC64
Hi Sergei,
thanks for your comments!
On Fri, Dec 26, 2014 at 04:04:26PM +0100, Sergei Golubchik wrote:
> > MDEV-7273 - 10.1 fails to start up during tc_log initializations on PPC64
...skip...
> > --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
> > +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
> > @@ -1757,6 +1757,20 @@ NUMERIC_BLOCK_SIZE NULL
> > ENUM_VALUE_LIST innodb,query_plan,explain
> > READ_ONLY NO
> > COMMAND_LINE_ARGUMENT REQUIRED
> > +VARIABLE_NAME LOG_TC_SIZE
> > +SESSION_VALUE NULL
> > +GLOBAL_VALUE 24576
> > +GLOBAL_VALUE_ORIGIN AUTO
> > +DEFAULT_VALUE 24576
> > +VARIABLE_SCOPE GLOBAL
> > +VARIABLE_TYPE BIGINT UNSIGNED
> > +VARIABLE_COMMENT Size of transaction coordinator log.
> > +NUMERIC_MIN_VALUE 24576
> > +NUMERIC_MAX_VALUE 18446744073709551615
> > +NUMERIC_BLOCK_SIZE 4096
> > +ENUM_VALUE_LIST NULL
> > +READ_ONLY YES
> > +COMMAND_LINE_ARGUMENT REQUIRED
>
> if the answer is "yes" - this test will fail there.
> even if the answer is "no", the variable value is architecture
> dependent.
>
> But it's good to see all stable variable metadata (e.g. that
> GLOBAL_VALUE_ORIGIN is AUTO).
Indeed. I'll check what we can do about it.
> > diff --git a/sql/log.cc b/sql/log.cc
> > index 66e1426..6d6512e 100644
> > --- a/sql/log.cc
> > +++ b/sql/log.cc
> > @@ -8793,7 +8792,7 @@ int TC_LOG_MMAP::unlog(ulong cookie, my_xid xid)
> > mysql_mutex_lock(&LOCK_pending_checkpoint);
> > if (pending_checkpoint == NULL)
> > {
> > - uint32 size= sizeof(*pending_checkpoint);
> > + uint32 size= sizeof(*pending_checkpoint) + tc_log_page_size / sizeof(my_xid);
>
> that's not enough. There are further sizeof's, like
>
> if (pending_checkpoint->count == sizeof(pending_checkpoint->cookies) /
> sizeof(pending_checkpoint->cookies[0]))
>
> and
>
> for (i= 0; i < sizeof(pending->cookies)/sizeof(pending->cookies[0]); ++i)
>
> I've found these two by looking for "sizeof" in the Kristian's patch
> that introduced pending_checkpoint. There can be more sizeofs added
> later.
Oh, my bad. Thanks for pointing this out!
> > diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
> > index fb11377..bfaf7d7 100644
> > --- a/sql/sys_vars.cc
> > +++ b/sql/sys_vars.cc
> > @@ -5202,3 +5202,14 @@ static Sys_var_mybool Sys_strict_password_validation(
> > "that cannot be validated (passwords specified as a hash)",
> > GLOBAL_VAR(strict_password_validation),
> > CMD_LINE(OPT_ARG), DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
> > +
> > +#ifdef HAVE_MMAP
> > +static Sys_var_ulong Sys_log_tc_size(
> > + "log_tc_size",
> > + "Size of transaction coordinator log.",
> > + READ_ONLY GLOBAL_VAR(opt_tc_log_size),
> > + CMD_LINE(REQUIRED_ARG),
> > + VALID_RANGE(my_getpagesize() * 6, ULONG_MAX),
> > + DEFAULT(my_getpagesize() * 6),
> > + BLOCK_SIZE(my_getpagesize()));
>
> I think, min value could be my_getpagesize()*3 ?
It was equal to default value, that is 8192 * 3. But probably it could be
my_getpagesize() * 3. I'll change it.
Thanks,
Sergey
References