Bug #20248 Allow slave server with --read-only to create temp table
Submitted: 3 Jun 2006 18:20 Modified: 3 Jun 2006 19:52
Reporter: jocelyn fournier (Silver Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1.20 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[3 Jun 2006 18:20] jocelyn fournier
Description:
Hi,

I have some slaves configured on my system with the --read-only flag.
However I would like to autorize the creation of temporary tables (through CREATE TEMPORARY TABLE) since it should be harmless for the replication.
Is this possible to consider to allow this kind of queries ?

Thanks and regards,
  Jocelyn

How to repeat:
Try to create a temp table on a slave, it'll fail.
[3 Jun 2006 19:24] Guilhem Bichot
Bonjour Jocelyn,
I already added what you describe in the 5.0 branch, it was this changeset:
ChangeSet@1.1932.313.1, 2005-10-17 10:52:34+02:00, guilhem@mysql.com
  Fix for BUG#4544 "read_only also affects temporary tables":
  the READ_ONLY global variable now allows statements which are to update only temporary tables
  (note: if a statement, after parse stage, looks like it will update a non-temp table, it will be rejected,
  even if at execution it would have turned out that 0 rows would be updated; for example
  UPDATE my_non_tem_table SET a=1 WHERE 1 = 0; will be rejected).
It won't be backported to 4.1 (we only fix bad bugs in 4.1 now).
[3 Jun 2006 19:52] jocelyn fournier
Bonsoir Guilhem,

Thanks for the info, I think I'll be time to upgrade to 5.0 on this server :)

  Jocelyn