Skip to content
  • Lakshmi Narayanan Sreethar's avatar
    132ac89b
    Bug #27778713 'CREATE TABLE IF EXISTS' RETURNS ERROR 157 DUE TO UNINITIALIZED THD_NDB · 132ac89b
    Lakshmi Narayanan Sreethar authored
    During the execution of 'create table if not exists' DDL query,
    ha_ndbcluster::get_default_num_partitions() is called by the
    open_table() function implicitly when open_table() finds out that the
    requested table already exists. In certain cases
    get_default_num_partitions() is called without the thd_ndb object being
    seized and initialised. Due to this, the get_default_num_partitions()
    reports a HA_ERR_NO_CONNECTION(157) error.
    
    This patch fixes that by checking and initialising the thd_ndb object
    always from within ha_ndbcluster::get_default_num_partitions() if it is
    not initialised already.
    132ac89b
    Bug #27778713 'CREATE TABLE IF EXISTS' RETURNS ERROR 157 DUE TO UNINITIALIZED THD_NDB
    Lakshmi Narayanan Sreethar authored
    During the execution of 'create table if not exists' DDL query,
    ha_ndbcluster::get_default_num_partitions() is called by the
    open_table() function implicitly when open_table() finds out that the
    requested table already exists. In certain cases
    get_default_num_partitions() is called without the thd_ndb object being
    seized and initialised. Due to this, the get_default_num_partitions()
    reports a HA_ERR_NO_CONNECTION(157) error.
    
    This patch fixes that by checking and initialising the thd_ndb object
    always from within ha_ndbcluster::get_default_num_partitions() if it is
    not initialised already.
Loading