Index: metastore/scripts/upgrade/mysql/008-HIVE-2246.mysql.sql =================================================================== --- metastore/scripts/upgrade/mysql/008-HIVE-2246.mysql.sql (revision 1198986) +++ metastore/scripts/upgrade/mysql/008-HIVE-2246.mysql.sql (working copy) @@ -26,7 +26,7 @@ DROP TABLE IF EXISTS COLUMNS_V2; DROP TABLE IF EXISTS TABLE_SDS; DROP TABLE IF EXISTS CDS; - RENAME COLUMNS_OLD TO COLUMNS; + RENAME TABLE COLUMNS_OLD TO COLUMNS; END $$ @@ -140,7 +140,7 @@ JOIN PARTITIONS p on p.SD_ID = sd.SD_ID JOIN TBLS t on t.TBL_ID = p.TBL_ID SET sd.CD_ID = t.SD_ID - where p.SD_ID is not null + where p.SD_ID is not null; SELECT 'Updated CD_IDs in SDS for partitions'; END $$