Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.DataDictionary.startWriting()


        DataDictionary dd = lcc.getDataDictionary();
        TransactionController tc = lcc.getTransactionExecute();

        final String grantor = lcc.getCurrentUserId(activation);

        dd.startWriting(lcc);

        for (Iterator rIter = roleNames.iterator(); rIter.hasNext();) {
            String role = (String)rIter.next();

            if (role.equals(Authorizer.PUBLIC_AUTHORIZATION_ID)) {
View Full Code Here


    ** it seemed safer to do this whole operation in "write" mode.
    **
    ** We tell the data dictionary we're done writing at the end of
    ** the transaction.
    */
    dd.startWriting(lcc);

    // need to lock heap in exclusive mode first.  Because we can't first
    // shared lock the row in SYSCONGLOMERATES and later exclusively lock
    // it, this is potential deadlock (track 879).  Also td need to be
    // gotten after we get the lock, a concurrent thread could be modifying
View Full Code Here

    ** it seemed safer to do this whole operation in "write" mode.
    **
    ** We tell the data dictionary we're done writing at the end of
    ** the transaction.
    */
    dd.startWriting(lcc);

    TableDescriptor td = dd.getTableDescriptor(tableId);
    if (td == null)
    {
      throw StandardException.newException(
View Full Code Here

   
    DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();

    RoutinePermsDescriptor routinePermsDesc = ddg.newRoutinePermsDescriptor( aliasDescriptor, currentUser);

    dd.startWriting(lcc);
    for( Iterator itr = grantees.iterator(); itr.hasNext();)
    {
      // Keep track to see if any privileges are revoked by a revoke
      // statement. If a privilege is not revoked, we need to raise a
      // warning.
View Full Code Here

    ** it seemed safer to do this whole operation in "write" mode.
    **
    ** We tell the data dictionary we're done writing at the end of
    ** the transaction.
    */
    dd.startWriting(lcc);

    /* Get the alias descriptor.  We're responsible for raising
     * the error if it isn't found
     */
    AliasDescriptor ad = dd.getAliasDescriptor(sd.getUUID().toString(), aliasName, nameSpace);
View Full Code Here

    ** Indicate that we are about to modify the data dictionary.
    **
    ** We tell the data dictionary we're done writing at the end of
    ** the transaction.
    */
    dd.startWriting(lcc);

    SchemaDescriptor triggerSd = getSchemaDescriptorForCreate(dd, activation, triggerSchemaName);

    if (spsCompSchemaId == null) {
      SchemaDescriptor def = lcc.getDefaultSchema();
View Full Code Here

                            stats[si].getColumnCount() + ")";
                    logAlways(td, null, msg);
                    trace(1, msg + " on table " + stats[si].getTableUUID());
                    DataDictionary dd = lcc.getDataDictionary();
                    if (!lcc.dataDictionaryInWriteMode()) {
                        dd.startWriting(lcc);
                    }
                    dd.dropStatisticsDescriptors(
                            td.getUUID(), stats[si].getReferenceID(), tc);
                    if (asBackgroundTask) {
                        lcc.internalCommit(true);
View Full Code Here

        // Update the heap row count estimate.
        setHeapRowEstimate(tc, td.getHeapConglomerateId(), numRows);
        // Drop existing index statistics for this index.
        if (!lcc.dataDictionaryInWriteMode()) {
            dd.startWriting(lcc);
        }
        dd.dropStatisticsDescriptors(table, index, tc);

        boolean conglomerateGone = false; // invalidation control flag
        // Don't write statistics if the table is empty.
View Full Code Here

        DependencyManager dm = dd.getDependencyManager();
        int retries = 0;
        while (true) {
            try {
                if (!lcc.dataDictionaryInWriteMode()) {
                    dd.startWriting(lcc);
                }
                dm.invalidateFor(
                        td, DependencyManager.UPDATE_STATISTICS, lcc);
                trace(1, "invalidation completed");
                break;
View Full Code Here

        ** it seemed safer to do this whole operation in "write" mode.
        **
        ** We tell the data dictionary we're done writing at the end of
        ** the transaction.
        */
        dd.startWriting(lcc);
        dd.clearSequenceCaches();

        SequenceDescriptor sequenceDescriptor = dd.getSequenceDescriptor(schemaDescriptor, sequenceName);

        if (sequenceDescriptor == null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.