Hive
  1. Hive
  2. HIVE-1902

create script for the metastore upgrade due to HIVE-78

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0
    • Component/s: Authorization, Metastore
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      If migrating from a Hive 0.6 installation, please use the appropriate upgrade script to upgrade the metastore prior to first use of the system.
    1. HIVE-1902.1.patch.txt
      16 kB
      Arvind Prabhakar

      Issue Links

        Activity

        Hide
        Shrijeet Paliwal added a comment -

        Stumbled upon one issue while running meta store upgrade script. Steps to reproduce:
        1. Have hive 0.6 metastore with no partitioned tables.
        2. Run meta store script upgrade-0.7.0.mysql.sql

        Get an error :

        ERROR 1005 (HY000) at line 64: Can't create table 'hive_meta_data.PART_COL_PRIVS' (errno: 150)
        

        I think the table 'PARTITIONS' is created when you have your first partition registered. Hence following action while creating PART_COL_PRIVS fails:

        CONSTRAINT `PART_COL_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`)
        

        Another (minor) issue is with following entry in script :

        ALTER TABLE `DBS` DROP COLUMN `PARAMETERS`;
        

        The DBS table has not column PARAMETERS (at-least in 0.6).

        Show
        Shrijeet Paliwal added a comment - Stumbled upon one issue while running meta store upgrade script. Steps to reproduce: 1. Have hive 0.6 metastore with no partitioned tables. 2. Run meta store script upgrade-0.7.0.mysql.sql Get an error : ERROR 1005 (HY000) at line 64: Can't create table 'hive_meta_data.PART_COL_PRIVS' (errno: 150) I think the table 'PARTITIONS' is created when you have your first partition registered. Hence following action while creating PART_COL_PRIVS fails: CONSTRAINT `PART_COL_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`) Another (minor) issue is with following entry in script : ALTER TABLE `DBS` DROP COLUMN `PARAMETERS`; The DBS table has not column PARAMETERS (at-least in 0.6).
        Hide
        Carl Steinbach added a comment -

        +1

        Committed to trunk and branch-0.7.

        Show
        Carl Steinbach added a comment - +1 Committed to trunk and branch-0.7.
        Hide
        Arvind Prabhakar added a comment -

        This change introduces the necessary upgrade scripts for upgrading metastore schema for Hive 0.6 to Hive 0.7. The scripts included are for Derby and MySQL 5.1.48 databases.

        This change also fixes HIVE-1904 and HIVE-1905.

        Tested the scripts as follows:

        ) Checked out the 0.6.0 branch and created derby and mysql based metastore databases.

        2) Checked out and built the 0.7.0 branch.

        3) Applied the following configuration settings in hive-site.xml:
        datanucleus.validateTables=true
        datanucleus.validateColumns=true
        datanucleus.validateConstraints=true
        datanucleus.autoCreateSchema=false

        4) Verified that using either the mysql or derby metastores resulted in schema validation errors.

        5) Applied the 0.7.0 metastore upgrade scripts to the respective metastore DBs.

        6) Verified that both metastore DBs work after applying the upgrade script.

        Show
        Arvind Prabhakar added a comment - This change introduces the necessary upgrade scripts for upgrading metastore schema for Hive 0.6 to Hive 0.7. The scripts included are for Derby and MySQL 5.1.48 databases. This change also fixes HIVE-1904 and HIVE-1905 . Tested the scripts as follows: ) Checked out the 0.6.0 branch and created derby and mysql based metastore databases. 2) Checked out and built the 0.7.0 branch. 3) Applied the following configuration settings in hive-site.xml: datanucleus.validateTables=true datanucleus.validateColumns=true datanucleus.validateConstraints=true datanucleus.autoCreateSchema=false 4) Verified that using either the mysql or derby metastores resulted in schema validation errors. 5) Applied the 0.7.0 metastore upgrade scripts to the respective metastore DBs. 6) Verified that both metastore DBs work after applying the upgrade script.
        Hide
        Namit Jain added a comment -

        can you put them in a patch -

        create new files in
        metastore/scripts/upgrade.

        Show
        Namit Jain added a comment - can you put them in a patch - create new files in metastore/scripts/upgrade.
        Hide
        He Yongqiang added a comment -

        Also forgot this one:

        DROP TABLE IF EXISTS `PART_COL_PRIVS`;
        CREATE TABLE `PART_COL_PRIVS` (
        `PART_COLUMN_GRANT_ID` bigint(20) NOT NULL,
        `COLUMN_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PART_ID` bigint(20) default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PART_COL_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL,
        PRIMARY KEY (`PART_COLUMN_GRANT_ID`),
        KEY `PART_COL_PRIVS_N49` (`PART_ID`),
        KEY `PARTITIONCOLUMNPRIVILEGEINDEX` (`PART_ID`,`COLUMN_NAME`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`PART_COL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`),
        CONSTRAINT `PART_COL_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

        Please refer to the wiki page link for updates.

        Show
        He Yongqiang added a comment - Also forgot this one: DROP TABLE IF EXISTS `PART_COL_PRIVS`; CREATE TABLE `PART_COL_PRIVS` ( `PART_COLUMN_GRANT_ID` bigint(20) NOT NULL, `COLUMN_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `CREATE_TIME` int(11) NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PART_ID` bigint(20) default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PART_COL_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL, PRIMARY KEY (`PART_COLUMN_GRANT_ID`), KEY `PART_COL_PRIVS_N49` (`PART_ID`), KEY `PARTITIONCOLUMNPRIVILEGEINDEX` (`PART_ID`,`COLUMN_NAME`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`PART_COL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), CONSTRAINT `PART_COL_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Please refer to the wiki page link for updates.
        Hide
        He Yongqiang added a comment -

        sorry, forget this one:

        CREATE TABLE `PART_PRIVS` (
        `PART_GRANT_ID` bigint(20) NOT NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PART_ID` bigint(20) default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PART_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL,
        PRIMARY KEY (`PART_GRANT_ID`),
        KEY `PARTPRIVILEGEINDEX` (`PART_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`PART_PRIV`,`GRANTOR`,`GRANTOR_TYPE`),
        KEY `PART_PRIVS_N49` (`PART_ID`),
        CONSTRAINT `PART_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

        Show
        He Yongqiang added a comment - sorry, forget this one: CREATE TABLE `PART_PRIVS` ( `PART_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PART_ID` bigint(20) default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PART_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL, PRIMARY KEY (`PART_GRANT_ID`), KEY `PARTPRIVILEGEINDEX` (`PART_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`PART_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), KEY `PART_PRIVS_N49` (`PART_ID`), CONSTRAINT `PART_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
        Hide
        Carl Steinbach added a comment -

        The metastore upgrade scripts are located in metastore/scripts/upgrade.

        Also, it seems like automatically dropping the tables is probably a bad idea.

        Show
        Carl Steinbach added a comment - The metastore upgrade scripts are located in metastore/scripts/upgrade. Also, it seems like automatically dropping the tables is probably a bad idea.
        Hide
        He Yongqiang added a comment -
        Show
        He Yongqiang added a comment - Please refer to this page for updates: http://wiki.apache.org/hadoop/Hive/AuthDev#A8._Metastore_upgrade_script_for_mysql
        Hide
        He Yongqiang added a comment -

        This is the script for mysql upgrade:


        -- Table structure for table `ROLES`

        DROP TABLE IF EXISTS `ROLES`;
        CREATE TABLE `ROLES` (
        `ROLE_ID` bigint(20) NOT NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `OWNER_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `ROLE_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        PRIMARY KEY (`ROLE_ID`),
        UNIQUE KEY `ROLEENTITYINDEX` (`ROLE_NAME`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


        -- Table structure for table `ROLE_MAP`

        DROP TABLE IF EXISTS `ROLE_MAP`;
        CREATE TABLE `ROLE_MAP` (
        `ROLE_GRANT_ID` bigint(20) NOT NULL,
        `ADD_TIME` int(11) NOT NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `ROLE_ID` bigint(20) default NULL,
        PRIMARY KEY (`ROLE_GRANT_ID`),
        UNIQUE KEY `USERROLEMAPINDEX` (`PRINCIPAL_NAME`,`ROLE_ID`,`GRANTOR`,`GRANTOR_TYPE`),
        KEY `ROLE_MAP_N49` (`ROLE_ID`),
        CONSTRAINT `ROLE_MAP_FK1` FOREIGN KEY (`ROLE_ID`) REFERENCES `ROLES` (`ROLE_ID`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


        -- Table structure for table `GLOBAL_PRIVS`

        DROP TABLE IF EXISTS `GLOBAL_PRIVS`;
        CREATE TABLE `GLOBAL_PRIVS` (
        `USER_GRANT_ID` bigint(20) NOT NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `USER_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL,
        PRIMARY KEY (`USER_GRANT_ID`),
        UNIQUE KEY `GLOBALPRIVILEGEINDEX` (`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`USER_PRIV`,`GRANTOR`,`GRANTOR_TYPE`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


        -- Table structure for table `DB_PRIVS`

        DROP TABLE IF EXISTS `DB_PRIVS`;
        CREATE TABLE `DB_PRIVS` (
        `DB_GRANT_ID` bigint(20) NOT NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `DB_ID` bigint(20) default NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `DB_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL,
        PRIMARY KEY (`DB_GRANT_ID`),
        UNIQUE KEY `DBPRIVILEGEINDEX` (`DB_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`DB_PRIV`,`GRANTOR`,`GRANTOR_TYPE`),
        KEY `DB_PRIVS_N49` (`DB_ID`),
        CONSTRAINT `DB_PRIVS_FK1` FOREIGN KEY (`DB_ID`) REFERENCES `DBS` (`DB_ID`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


        -- Table structure for table `TBL_PRIVS`

        DROP TABLE IF EXISTS `TBL_PRIVS`;

        CREATE TABLE `TBL_PRIVS` (
        `TBL_GRANT_ID` bigint(20) NOT NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `TBL_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL,
        `TBL_ID` bigint(20) default NULL,
        PRIMARY KEY (`TBL_GRANT_ID`),
        KEY `TBL_PRIVS_N49` (`TBL_ID`),
        KEY `TABLEPRIVILEGEINDEX` (`TBL_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`TBL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`),
        CONSTRAINT `TBL_PRIVS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


        -- Table structure for table `TBL_COL_PRIVS`

        DROP TABLE IF EXISTS `TBL_COL_PRIVS`;
        CREATE TABLE `TBL_COL_PRIVS` (
        `TBL_COLUMN_GRANT_ID` bigint(20) NOT NULL,
        `COLUMN_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `CREATE_TIME` int(11) NOT NULL,
        `GRANT_OPTION` smallint(6) NOT NULL,
        `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL,
        `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL,
        `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL,
        `TBL_COL_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL,
        `TBL_ID` bigint(20) default NULL,
        PRIMARY KEY (`TBL_COLUMN_GRANT_ID`),
        KEY `TABLECOLUMNPRIVILEGEINDEX` (`TBL_ID`,`COLUMN_NAME`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`TBL_COL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`),
        KEY `TBL_COL_PRIVS_N49` (`TBL_ID`),
        CONSTRAINT `TBL_COL_PRIVS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

        Show
        He Yongqiang added a comment - This is the script for mysql upgrade: – -- Table structure for table `ROLES` – DROP TABLE IF EXISTS `ROLES`; CREATE TABLE `ROLES` ( `ROLE_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `OWNER_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `ROLE_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, PRIMARY KEY (`ROLE_ID`), UNIQUE KEY `ROLEENTITYINDEX` (`ROLE_NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; – -- Table structure for table `ROLE_MAP` – DROP TABLE IF EXISTS `ROLE_MAP`; CREATE TABLE `ROLE_MAP` ( `ROLE_GRANT_ID` bigint(20) NOT NULL, `ADD_TIME` int(11) NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `ROLE_ID` bigint(20) default NULL, PRIMARY KEY (`ROLE_GRANT_ID`), UNIQUE KEY `USERROLEMAPINDEX` (`PRINCIPAL_NAME`,`ROLE_ID`,`GRANTOR`,`GRANTOR_TYPE`), KEY `ROLE_MAP_N49` (`ROLE_ID`), CONSTRAINT `ROLE_MAP_FK1` FOREIGN KEY (`ROLE_ID`) REFERENCES `ROLES` (`ROLE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; – -- Table structure for table `GLOBAL_PRIVS` – DROP TABLE IF EXISTS `GLOBAL_PRIVS`; CREATE TABLE `GLOBAL_PRIVS` ( `USER_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `USER_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL, PRIMARY KEY (`USER_GRANT_ID`), UNIQUE KEY `GLOBALPRIVILEGEINDEX` (`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`USER_PRIV`,`GRANTOR`,`GRANTOR_TYPE`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; – -- Table structure for table `DB_PRIVS` – DROP TABLE IF EXISTS `DB_PRIVS`; CREATE TABLE `DB_PRIVS` ( `DB_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `DB_ID` bigint(20) default NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `DB_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL, PRIMARY KEY (`DB_GRANT_ID`), UNIQUE KEY `DBPRIVILEGEINDEX` (`DB_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`DB_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), KEY `DB_PRIVS_N49` (`DB_ID`), CONSTRAINT `DB_PRIVS_FK1` FOREIGN KEY (`DB_ID`) REFERENCES `DBS` (`DB_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; – -- Table structure for table `TBL_PRIVS` – DROP TABLE IF EXISTS `TBL_PRIVS`; CREATE TABLE `TBL_PRIVS` ( `TBL_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `TBL_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL, `TBL_ID` bigint(20) default NULL, PRIMARY KEY (`TBL_GRANT_ID`), KEY `TBL_PRIVS_N49` (`TBL_ID`), KEY `TABLEPRIVILEGEINDEX` (`TBL_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`TBL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), CONSTRAINT `TBL_PRIVS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; – -- Table structure for table `TBL_COL_PRIVS` – DROP TABLE IF EXISTS `TBL_COL_PRIVS`; CREATE TABLE `TBL_COL_PRIVS` ( `TBL_COLUMN_GRANT_ID` bigint(20) NOT NULL, `COLUMN_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `CREATE_TIME` int(11) NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) character set latin1 collate latin1_bin default NULL, `GRANTOR_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_NAME` varchar(128) character set latin1 collate latin1_bin default NULL, `PRINCIPAL_TYPE` varchar(128) character set latin1 collate latin1_bin default NULL, `TBL_COL_PRIV` varchar(128) character set latin1 collate latin1_bin default NULL, `TBL_ID` bigint(20) default NULL, PRIMARY KEY (`TBL_COLUMN_GRANT_ID`), KEY `TABLECOLUMNPRIVILEGEINDEX` (`TBL_ID`,`COLUMN_NAME`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`TBL_COL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), KEY `TBL_COL_PRIVS_N49` (`TBL_ID`), CONSTRAINT `TBL_COL_PRIVS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

          People

          • Assignee:
            Arvind Prabhakar
            Reporter:
            Namit Jain
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development