• Daniele Sciascia's avatar
    Cleanup wsrep_schema and remove all references to wsrep_thd_pool · 047754a7
    Daniele Sciascia authored
    * Removed all references related to wsrep_thd_pool (which was removed)
    
    * Removed unused declarations in wsrep_schema.h
    
    * The following would result invalid reads in
      Wsrep_schema::replay_transaction():
      ```
      frag_table->field[4]->val_str(&buf);
    
      Wsrep_schema_impl::end_index_scan(frag_table);
      Wsrep_schema_impl::finish_stmt(thd);
      ret= wsrep_apply_events(thd, rli, buf.c_ptr_safe(), buf.length());
      ```
    
      because `buf` was accessed after closing the table. The fix is to
      perform storage reads using a different THD.
    
    * In Wsrep_schema::recover_sr_transactions(), cluster_table was opened
      for write, however it is only read here. And frag_table was opened
      for read, wereas write is potentially needed.
      Also, avoid copy caused by String::c_ptr() to zero terminate the c
      string, use c_ptr_quick instead.
    047754a7
wsrep_schema.h 4.39 KB