Loading sql/ha_ndbcluster.cc +22 −4 Original line number Diff line number Diff line Loading @@ -197,6 +197,16 @@ struct Ndb_table_local_info { ha_rows records; }; void ha_ndbcluster::set_rec_per_key() { DBUG_ENTER("ha_ndbcluster::get_status_const"); for (uint i=0 ; i < table->keys ; i++) { table->key_info[i].rec_per_key[table->key_info[i].key_parts-1]= 1; } DBUG_VOID_RETURN; } void ha_ndbcluster::records_update() { DBUG_ENTER("ha_ndbcluster::records_update"); Loading Loading @@ -2405,8 +2415,6 @@ void ha_ndbcluster::info(uint flag) DBUG_PRINT("info", ("HA_STATUS_NO_LOCK")); if (flag & HA_STATUS_TIME) DBUG_PRINT("info", ("HA_STATUS_TIME")); if (flag & HA_STATUS_CONST) DBUG_PRINT("info", ("HA_STATUS_CONST")); if (flag & HA_STATUS_VARIABLE) { DBUG_PRINT("info", ("HA_STATUS_VARIABLE")); Loading @@ -2421,6 +2429,11 @@ void ha_ndbcluster::info(uint flag) records= rows; } } } if (flag & HA_STATUS_CONST) { DBUG_PRINT("info", ("HA_STATUS_CONST")); set_rec_per_key(); } if (flag & HA_STATUS_ERRKEY) { Loading Loading @@ -3523,6 +3536,7 @@ ha_ndbcluster::~ha_ndbcluster() int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked) { int res; KEY *key; DBUG_ENTER("open"); DBUG_PRINT("enter", ("name: %s mode: %d test_if_locked: %d", Loading Loading @@ -3550,7 +3564,11 @@ int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked) DBUG_RETURN(HA_ERR_NO_CONNECTION); } DBUG_RETURN(get_metadata(name)); res= get_metadata(name); if (!res) info(HA_STATUS_VARIABLE | HA_STATUS_CONST); DBUG_RETURN(res); } Loading Loading
sql/ha_ndbcluster.cc +22 −4 Original line number Diff line number Diff line Loading @@ -197,6 +197,16 @@ struct Ndb_table_local_info { ha_rows records; }; void ha_ndbcluster::set_rec_per_key() { DBUG_ENTER("ha_ndbcluster::get_status_const"); for (uint i=0 ; i < table->keys ; i++) { table->key_info[i].rec_per_key[table->key_info[i].key_parts-1]= 1; } DBUG_VOID_RETURN; } void ha_ndbcluster::records_update() { DBUG_ENTER("ha_ndbcluster::records_update"); Loading Loading @@ -2405,8 +2415,6 @@ void ha_ndbcluster::info(uint flag) DBUG_PRINT("info", ("HA_STATUS_NO_LOCK")); if (flag & HA_STATUS_TIME) DBUG_PRINT("info", ("HA_STATUS_TIME")); if (flag & HA_STATUS_CONST) DBUG_PRINT("info", ("HA_STATUS_CONST")); if (flag & HA_STATUS_VARIABLE) { DBUG_PRINT("info", ("HA_STATUS_VARIABLE")); Loading @@ -2421,6 +2429,11 @@ void ha_ndbcluster::info(uint flag) records= rows; } } } if (flag & HA_STATUS_CONST) { DBUG_PRINT("info", ("HA_STATUS_CONST")); set_rec_per_key(); } if (flag & HA_STATUS_ERRKEY) { Loading Loading @@ -3523,6 +3536,7 @@ ha_ndbcluster::~ha_ndbcluster() int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked) { int res; KEY *key; DBUG_ENTER("open"); DBUG_PRINT("enter", ("name: %s mode: %d test_if_locked: %d", Loading Loading @@ -3550,7 +3564,11 @@ int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked) DBUG_RETURN(HA_ERR_NO_CONNECTION); } DBUG_RETURN(get_metadata(name)); res= get_metadata(name); if (!res) info(HA_STATUS_VARIABLE | HA_STATUS_CONST); DBUG_RETURN(res); } Loading