Skip to content
  • Sivert Sorumgard's avatar
    aeb122d1
    WL#13369: Read only schema · aeb122d1
    Sivert Sorumgard authored
    Implement support for setting a single schema with all of its contents
    to be 'read only' using the SQL statement:
    
      ALTER SCHEMA <schema name> READ ONLY [=] {0,1,DEFAULT}
    
    Setting a schema to read only means that DDL modifying the schema or
    any schema qualified entities will fail. It also means that write
    operations on user data stored in one of the tables in the schema will
    fail.
    
    The read only option is ignored by bootstrap threads, upgrade code,
    and slave replication threads.
    
    In addition to the above functionality, some unrelated issues found
    during testing have been fixed:
    
    * While updating the validity of referencing views, we acquire
      referencing views and their schema based on object ids, and use
      their names to acquire MDL, both for the view and for the schema.
      However, we did this using the lettercase stored in the DD,
      whereas this should be lowercased when lower_case_table_names == 2.
    
    * If an error was raised when the event scheduler was trying to
      schedule a new event, the scheduler would stop without logging
      an error message stating what the error was.
    
    Change-Id: I7722bfecf6c97e3253ce795851e5ce1d5aa61f15
    aeb122d1
    WL#13369: Read only schema
    Sivert Sorumgard authored
    Implement support for setting a single schema with all of its contents
    to be 'read only' using the SQL statement:
    
      ALTER SCHEMA <schema name> READ ONLY [=] {0,1,DEFAULT}
    
    Setting a schema to read only means that DDL modifying the schema or
    any schema qualified entities will fail. It also means that write
    operations on user data stored in one of the tables in the schema will
    fail.
    
    The read only option is ignored by bootstrap threads, upgrade code,
    and slave replication threads.
    
    In addition to the above functionality, some unrelated issues found
    during testing have been fixed:
    
    * While updating the validity of referencing views, we acquire
      referencing views and their schema based on object ids, and use
      their names to acquire MDL, both for the view and for the schema.
      However, we did this using the lettercase stored in the DD,
      whereas this should be lowercased when lower_case_table_names == 2.
    
    * If an error was raised when the event scheduler was trying to
      schedule a new event, the scheduler would stop without logging
      an error message stating what the error was.
    
    Change-Id: I7722bfecf6c97e3253ce795851e5ce1d5aa61f15
Loading