Hi!
On Apr 07, ramil@stripped wrote:
> ChangeSet@stripped, 2008-04-07 13:34:55+05:00, ramil@stripped +3 -0
> Fix for bug #35732: read-only blocks SELECT statements in InnoDB
>
> Problem: SELECTs prohibited for a transactional SE in autocommit mode
> if read_only is set.
>
> Fix: allow them.
>
> diff -Nrup a/sql/handler.cc b/sql/handler.cc
> --- a/sql/handler.cc 2008-03-12 12:13:19 +04:00
> +++ b/sql/handler.cc 2008-04-07 13:34:53 +05:00
> @@ -1071,11 +1071,10 @@ int ha_commit_trans(THD *thd, bool all)
> DBUG_RETURN(1);
> }
>
> - if ( is_real_trans
> - && opt_readonly
> - && ! (thd->security_ctx->master_access & SUPER_ACL)
> - && ! thd->slave_thread
> - )
> + if (all &&
> + opt_readonly &&
> + !(thd->security_ctx->master_access & SUPER_ACL) &&
> + !thd->slave_thread)
> {
> my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
> ha_rollback_trans(thd, all);
Yeah ? I don't see where you enable "SELECT's", I only see that you
enable everything. Did you verify that INSERT's are still not permitted ?
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer/Server Architect
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140