diff --git a/dbcon/mysql/ha_mcs.cpp b/dbcon/mysql/ha_mcs.cpp index 61fda11c3..58dba85c6 100644 --- a/dbcon/mysql/ha_mcs.cpp +++ b/dbcon/mysql/ha_mcs.cpp @@ -149,7 +149,6 @@ static int columnstore_init_func(void* p) (void) my_hash_init(&calpont_open_tables, system_charset_info, 32, 0, 0, (my_hash_get_key) calpont_get_key, 0, 0); - mcs_hton->state = SHOW_OPTION_YES; mcs_hton->create = calpont_create_handler; mcs_hton->flags = HTON_CAN_RECREATE; // mcs_hton->discover_table= calpont_discover; diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index 63dbb91a8..993a6cf59 100755 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -215,13 +215,13 @@ void getColNameFromItem(std::ostringstream& ostream, Item* item) { Item_ident* iip = reinterpret_cast(item); - if (iip->db_name) - ostream << iip->db_name << '.'; + if (iip->db_name.str) + ostream << iip->db_name.str << '.'; else ostream << "unknown db" << '.'; - if (iip->table_name) - ostream << iip->table_name << '.'; + if (iip->table_name.str) + ostream << iip->table_name.str << '.'; else ostream << "unknown table" << '.'; @@ -502,7 +502,7 @@ void debug_walk(const Item* item, void* arg) case Item::FIELD_ITEM: { Item_field* ifp = (Item_field*)item; - cerr << "FIELD_ITEM: " << (ifp->db_name ? ifp->db_name : "") << '.' << bestTableName(ifp) << + cerr << "FIELD_ITEM: " << (ifp->db_name.str ? ifp->db_name.str : "") << '.' << bestTableName(ifp) << '.' << ifp->field_name.str << endl; break; } @@ -912,7 +912,7 @@ void debug_walk(const Item* item, void* arg) //ifp->cached_table->select_lex->select_number gives the select level. // could be used on alias. // could also be used to tell correlated join (equal level). - cerr << "CACHED REF FIELD_ITEM: " << ifp->db_name << '.' << bestTableName(ifp) << + cerr << "CACHED REF FIELD_ITEM: " << ifp->db_name.str << '.' << bestTableName(ifp) << '.' << ifp->field_name.str << endl; break; } @@ -960,7 +960,7 @@ void debug_walk(const Item* item, void* arg) { Item_field* ifp = (Item_field*)(*(ifr->ref)); realType = "FIELD_ITEM "; - realType += ifp->db_name; + realType += ifp->db_name.str; realType += '.'; realType += bestTableName(ifp); realType += '.'; @@ -1019,7 +1019,7 @@ void debug_walk(const Item* item, void* arg) } else { - cerr << "REF FIELD_ITEM: " << ifp->db_name << '.' << bestTableName(ifp) << '.' << + cerr << "REF FIELD_ITEM: " << ifp->db_name.str << '.' << bestTableName(ifp) << '.' << ifp->field_name.str << endl; } @@ -1104,7 +1104,7 @@ void debug_walk(const Item* item, void* arg) //ifp->cached_table->select_lex->select_number gives the select level. // could be used on alias. // could also be used to tell correlated join (equal level). - cerr << "CACHED FIELD_ITEM: " << ifp->db_name << '.' << bestTableName(ifp) << + cerr << "CACHED FIELD_ITEM: " << ifp->db_name.str << '.' << bestTableName(ifp) << '.' << ifp->field_name.str << endl; break; } @@ -1147,7 +1147,7 @@ void debug_walk(const Item* item, void* arg) { Item_field* ifp = (Item_field*)(*(ifr->ref)); realType = "FIELD_ITEM "; - realType += ifp->db_name; + realType += ifp->db_name.str; realType += '.'; realType += bestTableName(ifp); realType += '.'; @@ -2350,7 +2350,7 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp) if (sc) break; if (!gwi.tbList[i].schema.empty() && !gwi.tbList[i].table.empty() && - (!ifp->table_name || strcasecmp(ifp->table_name, gwi.tbList[i].alias.c_str()) == 0)) + (!ifp->table_name.str || strcasecmp(ifp->table_name.str, gwi.tbList[i].alias.c_str()) == 0)) { CalpontSystemCatalog::TableName tn(gwi.tbList[i].schema, gwi.tbList[i].table); CalpontSystemCatalog::RIDList oidlist = gwi.csc->columnRIDs(tn, true); @@ -2405,7 +2405,7 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp) CalpontSelectExecutionPlan* csep = dynamic_cast(gwi.derivedTbList[i].get()); string derivedName = csep->derivedTbAlias(); - if (!ifp->table_name || strcasecmp(ifp->table_name, derivedName.c_str()) == 0) + if (!ifp->table_name.str || strcasecmp(ifp->table_name.str, derivedName.c_str()) == 0) { CalpontSelectExecutionPlan::ReturnedColumnList cols = csep->returnedCols(); @@ -2468,7 +2468,7 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp) while (tblList) { - if (strcasecmp(tblList->alias.str, ifp->table_name) == 0) + if (strcasecmp(tblList->alias.str, ifp->table_name.str) == 0) { if (!tblList->outer_join) { @@ -2495,11 +2495,11 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp) Message::Args args; string name; - if (ifp->db_name) - name += string(ifp->db_name) + "."; + if (ifp->db_name.str) + name += string(ifp->db_name.str) + "."; - if (ifp->table_name) - name += string(ifp->table_name) + "."; + if (ifp->table_name.str) + name += string(ifp->table_name.str) + "."; if (ifp->name.length) name += ifp->name.str; @@ -2543,7 +2543,7 @@ void collectAllCols(gp_walk_info& gwi, Item_field* ifp) } - string tableName = (ifp->table_name ? string(ifp->table_name) : ""); + string tableName = (ifp->table_name.str ? string(ifp->table_name.str) : ""); CalpontSelectExecutionPlan::SelectList::const_iterator it = gwi.derivedTbList.begin(); for (uint32_t i = 0; i < gwi.tbList.size(); i++) @@ -2753,13 +2753,13 @@ const string bestTableName(const Item_field* ifp) { idbassert(ifp); - if (!ifp->table_name) + if (!ifp->table_name.str) return ""; if (!ifp->field) - return ifp->table_name; + return ifp->table_name.str; - string table_name(ifp->table_name); + string table_name(ifp->table_name.str); string field_table_table_name; if (ifp->cached_table) @@ -4362,7 +4362,7 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) isInformationSchema = true; // support FRPM subquery. columns from the derived table has no definition - if ((!ifp->field || !ifp->db_name || strlen(ifp->db_name) == 0) && !isInformationSchema) + if ((!ifp->field || !ifp->db_name.str || strlen(ifp->db_name.str) == 0) && !isInformationSchema) return buildSimpleColFromDerivedTable(gwi, ifp); CalpontSystemCatalog::ColType ct; @@ -4380,7 +4380,7 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) if (columnStore) { ct = gwi.csc->colType( - gwi.csc->lookupOID(make_tcn(ifp->db_name, bestTableName(ifp), ifp->field_name.str))); + gwi.csc->lookupOID(make_tcn(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str))); } else { @@ -4400,10 +4400,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) { case CalpontSystemCatalog::TINYINT: if (ct.scale == 0) - sc = new SimpleColumn_INT<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_INT<1>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); else { - sc = new SimpleColumn_Decimal<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_Decimal<1>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); ct.colDataType = CalpontSystemCatalog::DECIMAL; } @@ -4411,10 +4411,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) case CalpontSystemCatalog::SMALLINT: if (ct.scale == 0) - sc = new SimpleColumn_INT<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_INT<2>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); else { - sc = new SimpleColumn_Decimal<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_Decimal<2>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); ct.colDataType = CalpontSystemCatalog::DECIMAL; } @@ -4423,10 +4423,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) case CalpontSystemCatalog::INT: case CalpontSystemCatalog::MEDINT: if (ct.scale == 0) - sc = new SimpleColumn_INT<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_INT<4>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); else { - sc = new SimpleColumn_Decimal<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_Decimal<4>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); ct.colDataType = CalpontSystemCatalog::DECIMAL; } @@ -4434,38 +4434,38 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) case CalpontSystemCatalog::BIGINT: if (ct.scale == 0) - sc = new SimpleColumn_INT<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_INT<8>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); else { - sc = new SimpleColumn_Decimal<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_Decimal<8>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); ct.colDataType = CalpontSystemCatalog::DECIMAL; } break; case CalpontSystemCatalog::UTINYINT: - sc = new SimpleColumn_UINT<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_UINT<1>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); break; case CalpontSystemCatalog::USMALLINT: - sc = new SimpleColumn_UINT<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_UINT<2>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); break; case CalpontSystemCatalog::UINT: case CalpontSystemCatalog::UMEDINT: - sc = new SimpleColumn_UINT<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_UINT<4>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); break; case CalpontSystemCatalog::UBIGINT: - sc = new SimpleColumn_UINT<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn_UINT<8>(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); break; default: - sc = new SimpleColumn(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); + sc = new SimpleColumn(ifp->db_name.str, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid); } sc->resultType(ct); - string tbname(ifp->table_name); + string tbname(ifp->table_name.str); if (isInformationSchema) { @@ -5391,8 +5391,8 @@ void gp_walk(const Item* item, void* arg) for (uint32_t i = 0; i < tmpVec.size(); i++) { - if (tmpVec[i]->table_name) - tableSet.insert(tmpVec[i]->table_name); + if (tmpVec[i]->table_name.str) + tableSet.insert(tmpVec[i]->table_name.str); } if (tableSet.size() > 1) @@ -7944,8 +7944,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, } else if (join->unit) { - limitOffset = join->unit->offset_limit_cnt; - limitNum = join->unit->select_limit_cnt - limitOffset; + limitOffset = join->unit->lim.get_offset_limit(); + limitNum = join->unit->lim.get_select_limit() - limitOffset; } #else @@ -9818,11 +9818,11 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro Item_field* field = reinterpret_cast(ord_item); string fullname; - if (field->db_name) - fullname += string(field->db_name) + "."; + if (field->db_name.str) + fullname += string(field->db_name.str) + "."; - if (field->table_name) - fullname += string(field->table_name) + "."; + if (field->table_name.str) + fullname += string(field->table_name.str) + "."; if (field->field_name.length) fullname += string(field->field_name.str); diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index 766cfbea7..f74ef96f2 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -1336,10 +1336,10 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) string tmpTableName = bestTableName(item); //@Bug 5312 populate aliasname with tablename if it is empty - if (!item->table_name) + if (!item->table_name.str) aliasName = tmpTableName; else - aliasName = item->table_name; + aliasName = item->table_name.str; if (strcasecmp(tableName.c_str(), "") == 0) { @@ -1355,7 +1355,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) return -1; } - if (!item->db_name) + if (!item->db_name.str) { //@Bug 5312. if subselect, wait until the schema info is available. if (thd->derived_tables_processing) @@ -1369,7 +1369,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) } } else - schemaName = string(item->db_name); + schemaName = string(item->db_name.str); columnAssignmentPtr = new ColumnAssignment(item->name.str, "=", ""); if (item->field_type() == MYSQL_TYPE_TIMESTAMP || @@ -1460,9 +1460,9 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) { sectableName = bestTableName(tmpVec[i]); - if ( tmpVec[i]->db_name ) + if ( tmpVec[i]->db_name.str ) { - secschemaName = string(tmpVec[i]->db_name); + secschemaName = string(tmpVec[i]->db_name.str); } if ( (strcasecmp(tableName.c_str(), sectableName.c_str()) != 0) || @@ -1479,11 +1479,11 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) isFromCol = true; columnAssignmentPtr->fFromCol = true; Item_field* setIt = reinterpret_cast (value); - string sectableName = string(setIt->table_name); + string sectableName = string(setIt->table_name.str); - if ( setIt->db_name ) //derived table + if ( setIt->db_name.str ) //derived table { - string secschemaName = string(setIt->db_name); + string secschemaName = string(setIt->db_name.str); if ( (strcasecmp(tableName.c_str(), sectableName.c_str()) != 0) || (strcasecmp(schemaName.c_str(), secschemaName.c_str()) != 0)) { diff --git a/dbcon/mysql/ha_pseudocolumn.cpp b/dbcon/mysql/ha_pseudocolumn.cpp index 3c028ff2e..c355efea0 100644 --- a/dbcon/mysql/ha_pseudocolumn.cpp +++ b/dbcon/mysql/ha_pseudocolumn.cpp @@ -521,7 +521,7 @@ execplan::ReturnedColumn* buildPseudoColumn(Item* item, Item_field* field = (Item_field*)(ifp->arguments()[0]); // @todo rule out derive table - if (!field->field || !field->db_name || strlen(field->db_name) == 0) + if (!field->field || !field->db_name.str || strlen(field->db_name.str) == 0) return nullOnError(gwi, funcName); SimpleColumn* sc = buildSimpleColumn(field, gwi); diff --git a/dbcon/mysql/is_columnstore_columns.cpp b/dbcon/mysql/is_columnstore_columns.cpp index b664cfc7c..4bdb69b02 100644 --- a/dbcon/mysql/is_columnstore_columns.cpp +++ b/dbcon/mysql/is_columnstore_columns.cpp @@ -37,24 +37,23 @@ bool schema_table_store_record(THD* thd, TABLE* table); ST_FIELD_INFO is_columnstore_columns_fields[] = { - {"TABLE_SCHEMA", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"TABLE_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"COLUMN_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"DICTIONARY_OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {"LIST_OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {"TREE_OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {"DATA_TYPE", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"COLUMN_LENGTH", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"COLUMN_POSITION", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"COLUMN_DEFAULT", 0, MYSQL_TYPE_LONG_BLOB, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {"IS_NULLABLE", 1, MYSQL_TYPE_TINY, 0, 0, 0, 0}, - {"NUMERIC_PRECISION", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"NUMERIC_SCALE", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"IS_AUTOINCREMENT", 1, MYSQL_TYPE_TINY, 0, 0, 0, 0}, - {"COMPRESSION_TYPE", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0} - + Show::Column("TABLE_SCHEMA", Show::Varchar(64), NOT_NULL), + Show::Column("TABLE_NAME", Show::Varchar(64), NOT_NULL), + Show::Column("COLUMN_NAME", Show::Varchar(64), NOT_NULL), + Show::Column("OBJECT_ID", Show::ULong(0), NOT_NULL), + Show::Column("DICTIONARY_OBJECT_ID", Show::ULong(0), NULLABLE), + Show::Column("LIST_OBJECT_ID", Show::ULong(0), NULLABLE), + Show::Column("TREE_OBJECT_ID", Show::ULong(0), NULLABLE), + Show::Column("DATA_TYPE", Show::Varchar(64), NOT_NULL), + Show::Column("COLUMN_LENGTH", Show::ULong(0), NOT_NULL), + Show::Column("COLUMN_POSITION", Show::ULong(0), NOT_NULL), + Show::Column("COLUMN_DEFAULT", Show::Blob(255), NULLABLE), + Show::Column("IS_NULLABLE", Show::STiny(0), NOT_NULL), + Show::Column("NUMERIC_PRECISION", Show::ULong(0), NOT_NULL), + Show::Column("NUMERIC_SCALE", Show::ULong(0), NOT_NULL), + Show::Column("IS_AUTOINCREMENT", Show::STiny(0), NOT_NULL), + Show::Column("COMPRESSION_TYPE", Show::Varchar(64), NOT_NULL), + Show::CEnd() }; static void get_cond_item(Item_func* item, String** table, String** db) diff --git a/dbcon/mysql/is_columnstore_extents.cpp b/dbcon/mysql/is_columnstore_extents.cpp index cb8044806..b5997b3a6 100644 --- a/dbcon/mysql/is_columnstore_extents.cpp +++ b/dbcon/mysql/is_columnstore_extents.cpp @@ -33,23 +33,23 @@ bool schema_table_store_record(THD* thd, TABLE* table); ST_FIELD_INFO is_columnstore_extents_fields[] = { - {"OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 0 - {"OBJECT_TYPE", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, // 1 - {"LOGICAL_BLOCK_START", 19, MYSQL_TYPE_LONGLONG, 0, 0, 0, 0}, // 2 - {"LOGICAL_BLOCK_END", 19, MYSQL_TYPE_LONGLONG, 0, 0, 0, 0}, // 3 - {"MIN_VALUE", 19, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, // 4 - {"MAX_VALUE", 19, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, // 5 - {"WIDTH", 1, MYSQL_TYPE_TINY, 0, 0, 0, 0}, // 6 - {"DBROOT", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 7 - {"PARTITION_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 8 - {"SEGMENT_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 9 - {"BLOCK_OFFSET", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 10 - {"MAX_BLOCKS", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 11 - {"HIGH_WATER_MARK", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, // 12 - {"STATE", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, // 13 - {"STATUS", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, // 14 - {"DATA_SIZE", 19, MYSQL_TYPE_LONGLONG, 0, 0, 0, 0}, // 15 - {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0} + Show::Column("OBJECT_ID", Show::ULong(0), NOT_NULL), // 0 + Show::Column("OBJECT_TYPE", Show::Varchar(64), NOT_NULL), // 1 + Show::Column("LOGICAL_BLOCK_START", Show::SLonglong(0), NOT_NULL), // 2 + Show::Column("LOGICAL_BLOCK_END", Show::SLonglong(0), NOT_NULL), // 3 + Show::Column("MIN_VALUE", Show::SLonglong(0), NULLABLE), // 4 + Show::Column("MAX_VALUE", Show::SLonglong(0), NULLABLE), // 5 + Show::Column("WIDTH", Show::ULong(0), NOT_NULL), // 6 + Show::Column("DBROOT", Show::ULong(0), NOT_NULL), // 7 + Show::Column("PARTITION_ID", Show::ULong(0), NOT_NULL), // 8 + Show::Column("SEGMENT_ID", Show::ULong(0), NOT_NULL), // 9 + Show::Column("BLOCK_OFFSET", Show::ULong(0), NOT_NULL), // 10 + Show::Column("MAX_BLOCKS", Show::ULong(0), NOT_NULL), // 11 + Show::Column("HIGH_WATER_MARK", Show::ULong(0), NOT_NULL), // 12 + Show::Column("STATE", Show::Varchar(64), NOT_NULL), // 13 + Show::Column("STATUS", Show::Varchar(64), NOT_NULL), // 14 + Show::Column("DATA_SIZE", Show::ULonglong(0), NOT_NULL), // 15 + Show::CEnd() }; static int generate_result(BRM::OID_t oid, BRM::DBRM* emp, TABLE* table, THD* thd) diff --git a/dbcon/mysql/is_columnstore_files.cpp b/dbcon/mysql/is_columnstore_files.cpp index 429b5c650..020583459 100644 --- a/dbcon/mysql/is_columnstore_files.cpp +++ b/dbcon/mysql/is_columnstore_files.cpp @@ -42,13 +42,13 @@ bool schema_table_store_record(THD* thd, TABLE* table); ST_FIELD_INFO is_columnstore_files_fields[] = { - {"OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"SEGMENT_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"PARTITION_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"FILENAME", 1024, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"FILE_SIZE", 19, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {"COMPRESSED_DATA_SIZE", 19, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0} + Show::Column("OBJECT_ID", Show::ULong(0), NOT_NULL), + Show::Column("SEGMENT_ID", Show::ULong(0), NOT_NULL), + Show::Column("PARTITION_ID", Show::ULong(0), NOT_NULL), + Show::Column("FILENAME", Show::Varchar(1024), NOT_NULL), + Show::Column("FILE_SIZE", Show::ULonglong(0), NULLABLE), + Show::Column("COMPRESSED_DATA_SIZE", Show::ULonglong(0), NULLABLE), + Show::CEnd() }; static bool get_file_sizes(messageqcpp::MessageQueueClient* msgQueueClient, const char* fileName, off_t* fileSize, off_t* compressedFileSize) diff --git a/dbcon/mysql/is_columnstore_tables.cpp b/dbcon/mysql/is_columnstore_tables.cpp index 711d80da5..9734d7e52 100644 --- a/dbcon/mysql/is_columnstore_tables.cpp +++ b/dbcon/mysql/is_columnstore_tables.cpp @@ -33,13 +33,13 @@ bool schema_table_store_record(THD* thd, TABLE* table); ST_FIELD_INFO is_columnstore_tables_fields[] = { - {"TABLE_SCHEMA", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"TABLE_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0}, - {"OBJECT_ID", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"CREATION_DATE", 0, MYSQL_TYPE_DATE, 0, 0, 0, 0}, - {"COLUMN_COUNT", 11, MYSQL_TYPE_LONG, 0, 0, 0, 0}, - {"AUTOINCREMENT", 11, MYSQL_TYPE_LONG, 0, MY_I_S_MAYBE_NULL, 0, 0}, - {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0} + Show::Column("TABLE_SCHEMA", Show::Varchar(64), NOT_NULL), + Show::Column("TABLE_NAME", Show::Varchar(64), NOT_NULL), + Show::Column("OBJECT_ID", Show::SLong(0), NOT_NULL), + Show::Column("CREATION_DATE", Show::Datetime(0), NOT_NULL), // TODO: Make a date if possible + Show::Column("COLUMN_COUNT", Show::SLong(0), NOT_NULL), + Show::Column("AUTOINCREMENT", Show::SLong(0), NULLABLE), + Show::CEnd() }; static void get_cond_item(Item_func* item, String** table, String** db)