Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.SQLChar


        T_SecondaryIndexRow index_row = new T_SecondaryIndexRow();

        // base row template - last column is just to make row long so that
        // multiple pages are spanned.
        DataValueDescriptor[] base_row             = TemplateRow.newU8Row(4);
        base_row[3] = new SQLChar();

        String   string_1500char = new String();
        for (int i = 0; i < 300; i++)
            string_1500char += "mikem";

        boolean     ret_val = true;
        long        value   = -1;
        long        col1[]  = { 13444555679};
        long        col2[]  = { 11246246111};
        long        col3[]  = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};

        // set of deleted rows to make scans more interesting
        long d_col1[] ={ 02344555678, 10, 11, 12};
        long d_col2[] ={ 11235035001, 42, 42, 1};
        long d_col3[] ={91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104};

        REPORT("Starting t_003");

        // create the base table
        long base_conglomid =
            tc.createConglomerate(
                "heap",                            // create a heap conglomerate
                base_row,                          // base table template row
        null, //column sort order - not required for heap
                null,                              // default properties
                TransactionController.IS_DEFAULT); // not temporary

        // Open the base table
        ConglomerateController base_cc =
            tc.openConglomerate(
                base_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

        // initialize the secondary index row - pointing it at base row
        index_row.init(base_row, base_cc.newRowLocationTemplate(), 5);

        Properties properties =
            createProperties(
                null,               // no current properties list
                false,              // don't allow duplicates
                5,                  // 4 columns in index row
                5,                  // non-unique index
                true,               // maintain parent links
                base_conglomid,     // base conglom id
                4);                 // row loc in last column

        long index_conglomid =
            tc.createConglomerate(
                "BTREE",            // create a btree secondary
                index_row.getRow(),         // row template
        null, //column sort order - default
                properties,                 // properties
                TransactionController.IS_DEFAULT);   // not temporary

    // Open the conglomerate.
    ConglomerateController index_cc = 
            tc.openConglomerate(
                index_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
        T_SecondaryIndexRow template = new T_SecondaryIndexRow();
        RowLocation         row_loc  = base_cc.newRowLocationTemplate();
        template.init(base_row, row_loc, 5);

        // insert them in reverse order just to make sure btree is sorting them
        for (int i = col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
            //                ")" + template);
            if (index_cc.insert(template.getRow()) != 0)
                throw T_Fail.testFailMsg("insert failed");
        }

        index_cc.checkConsistency();

        ((B2IController)index_cc).debugConglomerate();

        ret_val = t_003_scan_test_cases(tc, index_conglomid, template);

        // insert and delete some interesting rows, deleted space management
        // may or may not clean these up.
        for (int i = d_col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(d_col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(d_col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(d_col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
View Full Code Here


    // Create a row.
    T_SecondaryIndexRow index_row = new T_SecondaryIndexRow();
        RowLocation             rowloc    = base_cc.newRowLocationTemplate();
        DataValueDescriptor[]   base_row  = TemplateRow.newU8Row(2);
        base_row[0] = new SQLChar("aaaaaaaaaa");
        index_row.init(base_row, rowloc, 3);

        ((SQLChar)base_row[0]).setValue(T_b2i.repeatString("a", 1000));
        ((SQLLongint)base_row[1]).setValue(1);
        base_cc.insertAndFetchLocation(base_row, rowloc);
View Full Code Here

    // Create a row.
    T_SecondaryIndexRow     index_row = new T_SecondaryIndexRow();
        RowLocation             rowloc    = base_cc.newRowLocationTemplate();
        DataValueDescriptor[]   base_row  = TemplateRow.newU8Row(2);
        base_row[0] = new SQLChar("aaaaaaaaaa");
        index_row.init(base_row, rowloc, 3);

        ((SQLChar)base_row[0]).setValue(T_b2i.repeatString("a", 1000));
        ((SQLLongint)base_row[1]).setValue(1);
        base_cc.insertAndFetchLocation(base_row, rowloc);
View Full Code Here

        T_SecondaryIndexRow index_row = new T_SecondaryIndexRow();

        // base row template - last column is just to make row long so that
        // multiple pages are spanned.
        DataValueDescriptor[] base_row             = TemplateRow.newU8Row(4);
        base_row[3] = new SQLChar();

        String   string_1500char = new String();
        for (int i = 0; i < 300; i++)
            string_1500char += "mikem";

        boolean     ret_val = true;
        long        value   = -1;
        long        col1[]  = { 13444555679};
        long        col2[]  = { 11246246111};
        long        col3[]  = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};

        // set of deleted rows to make scans more interesting
        long d_col1[] ={ 02344555678, 10, 11, 12};
        long d_col2[] ={ 11235035001, 42, 42, 1};
        long d_col3[] ={91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104};

   

        REPORT("Starting t_017");

        // create the base table
        long base_conglomid =
            tc.createConglomerate(
                "heap",                            // create a heap conglomerate
                base_row,                          // base table template row
        null, //column sort order - not required for heap
                null,                              // default properties
                TransactionController.IS_DEFAULT); // not temporary

        // Open the base table
        ConglomerateController base_cc =
            tc.openConglomerate(
                base_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

        // initialize the secondary index row - pointing it at base row
        index_row.init(base_row, base_cc.newRowLocationTemplate(), 5);

        Properties properties =
            createProperties(
                null,               // no current properties list
                false,              // don't allow duplicates
                5,                  // 4 columns in index row
                5,                  // non-unique index
                true,               // maintain parent links
                base_conglomid,     // base conglom id
                4);                 // row loc in last column

    // create the index with all the columns in descending order
        ColumnOrdering order[] = new ColumnOrdering[5];
    order[0] new T_ColumnOrderingImpl(0, false); // descending
    order[1] new T_ColumnOrderingImpl(1, false); // descending
    order[2] new T_ColumnOrderingImpl(2, false); // descending
    order[3] new T_ColumnOrderingImpl(3, false); // descending
    order[4] new T_ColumnOrderingImpl(4, true); // asccending

    long index_conglomid =
            tc.createConglomerate(
                "BTREE",            // create a btree secondary
                index_row.getRow(),         // row template
        order, //column sort order - default
                properties,                 // properties
                TransactionController.IS_DEFAULT);   // not temporary

    // Open the conglomerate.
    ConglomerateController index_cc = 
            tc.openConglomerate(
                index_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
        T_SecondaryIndexRow template = new T_SecondaryIndexRow();
        RowLocation         row_loc  = base_cc.newRowLocationTemplate();
        template.init(base_row, row_loc, 5);

        // insert them in reverse order just to make sure btree is sorting them
        for (int i = col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
            //                ")" + template);
            if (index_cc.insert(template.getRow()) != 0)
                throw T_Fail.testFailMsg("insert failed");
        }

        index_cc.checkConsistency();

        ((B2IController)index_cc).debugConglomerate();

        ret_val = t_desc_scan_test_cases(tc, index_conglomid, template);

        // insert and delete some interesting rows, deleted space management
        // may or may not clean these up.
        for (int i = d_col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(d_col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(d_col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(d_col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
View Full Code Here

        T_SecondaryIndexRow index_row = new T_SecondaryIndexRow();

        // base row template - last column is just to make row long so that
        // multiple pages are spanned.
        DataValueDescriptor[] base_row             = TemplateRow.newU8Row(4);
        base_row[3] = new SQLChar();

        String   string_1500char = new String();
        for (int i = 0; i < 300; i++)
            string_1500char += "mikem";

        boolean     ret_val = true;
        long        value   = -1;
        long        col1[]  = { 13444555679};
        long        col2[]  = { 11246246111};
        long        col3[]  = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};

        // set of deleted rows to make scans more interesting
        long d_col1[] ={ 02344555678, 10, 11, 12};
        long d_col2[] ={ 11235035001, 42, 42, 1};
        long d_col3[] ={91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104};

   

        REPORT("Starting t_018");

        // create the base table
        long base_conglomid =
            tc.createConglomerate(
                "heap",                            // create a heap conglomerate
                base_row,                          // base table template row
        null, //column sort order - not required for heap
                null,                              // default properties
                TransactionController.IS_DEFAULT); // not temporary

        // Open the base table
        ConglomerateController base_cc =
            tc.openConglomerate(
                base_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

        // initialize the secondary index row - pointing it at base row
        index_row.init(base_row, base_cc.newRowLocationTemplate(), 5);

        Properties properties =
            createProperties(
                null,               // no current properties list
                false,              // don't allow duplicates
                5,                  // 4 columns in index row
                5,                  // non-unique index
                true,               // maintain parent links
                base_conglomid,     // base conglom id
                4);                 // row loc in last column

    // create the index with all the columns in descending order
        ColumnOrdering order[] = new ColumnOrdering[5];
    order[0] new T_ColumnOrderingImpl(0, true); // Ascending
    order[1] new T_ColumnOrderingImpl(1, false); // descending
    order[2] new T_ColumnOrderingImpl(2, true); // Ascending
    order[3] new T_ColumnOrderingImpl(3, false); // descending
    order[4] new T_ColumnOrderingImpl(4, true); // asccending

    long index_conglomid =
            tc.createConglomerate(
                "BTREE",            // create a btree secondary
                index_row.getRow(),         // row template
        order, //column sort order - default
                properties,                 // properties
                TransactionController.IS_DEFAULT);   // not temporary

    // Open the conglomerate.
    ConglomerateController index_cc = 
            tc.openConglomerate(
                index_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
        T_SecondaryIndexRow template = new T_SecondaryIndexRow();
        RowLocation         row_loc  = base_cc.newRowLocationTemplate();
        template.init(base_row, row_loc, 5);

        // insert them in reverse order just to make sure btree is sorting them
        for (int i = col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
            //                ")" + template);
            if (index_cc.insert(template.getRow()) != 0)
                throw T_Fail.testFailMsg("insert failed");
        }

        index_cc.checkConsistency();

        ((B2IController)index_cc).debugConglomerate();

        ret_val = t_ascdesc_scan_test_cases(tc, index_conglomid, template);

        // insert and delete some interesting rows, deleted space management
        // may or may not clean these up.
        for (int i = d_col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(d_col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(d_col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(d_col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
View Full Code Here

        T_SecondaryIndexRow index_row = new T_SecondaryIndexRow();

        // base row template - last column is just to make row long so that
        // multiple pages are spanned.
        DataValueDescriptor[] base_row             = TemplateRow.newU8Row(4);
        base_row[3] = new SQLChar();

        String   string_1500char = new String();
        for (int i = 0; i < 300; i++)
            string_1500char += "mikem";

        boolean     ret_val = true;
        long        value   = -1;
        long        col1[]  = { 13444555679};
        long        col2[]  = { 11246246111};
        long        col3[]  = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};

        // set of deleted rows to make scans more interesting
        long d_col1[] ={ 02344555678, 10, 11, 12};
        long d_col2[] ={ 11235035001, 42, 42, 1};
        long d_col3[] ={91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104};

   

        REPORT("Starting t_019");

        // create the base table
        long base_conglomid =
            tc.createConglomerate(
                "heap",                            // create a heap conglomerate
                base_row,                          // base table template row
        null, //column sort order - not required for heap
                null,                              // default properties
                TransactionController.IS_DEFAULT); // not temporary

        // Open the base table
        ConglomerateController base_cc =
            tc.openConglomerate(
                base_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

        // initialize the secondary index row - pointing it at base row
        index_row.init(base_row, base_cc.newRowLocationTemplate(), 5);

        Properties properties =
            createProperties(
                null,               // no current properties list
                false,              // don't allow duplicates
                5,                  // 4 columns in index row
                5,                  // non-unique index
                true,               // maintain parent links
                base_conglomid,     // base conglom id
                4);                 // row loc in last column

    // create the index with all the columns in descending order
        ColumnOrdering order[] = new ColumnOrdering[5];
    order[0] new T_ColumnOrderingImpl(0, false); // Descending
    order[1] new T_ColumnOrderingImpl(1, true); // Ascending
    order[2] new T_ColumnOrderingImpl(2, true); // Ascending
    order[3] new T_ColumnOrderingImpl(3, false); // descending
    order[4] new T_ColumnOrderingImpl(4, true); // asccending

    long index_conglomid =
            tc.createConglomerate(
                "BTREE",            // create a btree secondary
                index_row.getRow(),         // row template
        order, //column sort order - default
                properties,                 // properties
                TransactionController.IS_DEFAULT);   // not temporary

    // Open the conglomerate.
    ConglomerateController index_cc = 
            tc.openConglomerate(
                index_conglomid,
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
        T_SecondaryIndexRow template = new T_SecondaryIndexRow();
        RowLocation         row_loc  = base_cc.newRowLocationTemplate();
        template.init(base_row, row_loc, 5);

        // insert them in reverse order just to make sure btree is sorting them
        for (int i = col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
            //                ")" + template);
            if (index_cc.insert(template.getRow()) != 0)
                throw T_Fail.testFailMsg("insert failed");
        }

        index_cc.checkConsistency();

        ((B2IController)index_cc).debugConglomerate();

        ret_val = t_ascdesc1_scan_test_cases(tc, index_conglomid, template);

        // insert and delete some interesting rows, deleted space management
        // may or may not clean these up.
        for (int i = d_col1.length - 1; i >= 0; i--)
        {
            ((SQLLongint)(template.getRow()[0])).setValue(d_col1[i]);
            ((SQLLongint)(template.getRow()[1])).setValue(d_col2[i]);
            ((SQLLongint)(template.getRow()[2])).setValue(d_col3[i]);
            base_row[3] = new SQLChar(string_1500char);

            base_cc.insertAndFetchLocation(base_row, row_loc);

            // Insert the row.
            // System.out.println("Adding record (" + -(i - (col1.length -1)) +
View Full Code Here

    }
    REPORT(numRows + " rows inserted ");

    // update all the fields in the even number rows to null
    // set all the fields in the odd number rows to REC_001
    DataValueDescriptor col = new SQLChar()// null
    for (i = page.FIRST_SLOT_NUMBER; i < (page.FIRST_SLOT_NUMBER + 2); i++) {

      for (slot = i; slot <= (numRows - 1); slot += 2) {

        for (j = 0; j <= 12; j++) {
          if (page.updateFieldAtSlot(slot, j, col, null) == null) {

            throw T_Fail.testFailMsg("Failed to update field " + j+ ", in row " + slot);
          }
        }
      }

      col = new SQLChar(REC_001);
    }

    // fetch all the fields, and see if they are correct
    DataValueDescriptor storedColumn = new SQLChar();
    field = null;
    for (i = page.FIRST_SLOT_NUMBER; i < (page.FIRST_SLOT_NUMBER + 2); i++) {

      for (slot = i; slot <= (numRows - 1); slot += 2) {

        for (j = 0; j <= 12; j++) {

          t_util.t_checkFetchColFromSlot(page, slot, j, storedColumn, false, field);

        }
      }

      field = REC_001;
    }

    // Now if we try to insert the old row again, there should still be no room
    if (page.spaceForInsert())
      throw T_Fail.testFailMsg("Did not get no room for record on page error");

    // update the first and last field of every row to REC_006
    col = new SQLChar(REC_006);
    for (slot = page.FIRST_SLOT_NUMBER; slot <= (numRows - 1); slot++) {
      if (page.updateFieldAtSlot(slot, 0, col, null) == null ||
          page.updateFieldAtSlot(slot, 12, col, null) == null) {

        throw T_Fail.testFailMsg("Failed to update fields to REC_006 in row " + slot);
      }
    }
   
    // update field 5 and 6 of every row to REC_007
    col = new SQLChar(REC_007);
    for (slot = page.FIRST_SLOT_NUMBER; slot <= (numRows - 1); slot++) {
      if (page.updateFieldAtSlot(slot, 5, col, null) == null ||
          page.updateFieldAtSlot(slot, 6, col, null) == null) {

        throw T_Fail.testFailMsg("Failed to update fields to REC_007 in row " + slot);
      }
    }

    // fetch all the fields again, and see if they are correct
    for (i = page.FIRST_SLOT_NUMBER; i < (page.FIRST_SLOT_NUMBER + 2); i++) {

      for (slot = i; slot <= (numRows - 1); slot += 2) {

        for (j = 0; j <= 12; j++) {

          switch (j) {
          case 0:
          case 12:
            field = REC_006;
            break;
          case 5:
          case 6:
            field = REC_007;
            break;
          default:
            if ((slot % 2) == 0)
              field = null;
            else
              field = REC_001;
            break;
          }

          t_util.t_checkFetchColFromSlot(page, slot, j, storedColumn, false, field);

        }
      }
    }

    // We now try to insert the old row one last time, there should still be no room
    if (page.spaceForInsert())
      throw T_Fail.testFailMsg("Did not get no room for record on page error");

    // now we want to increase row 0 and column 5 one byte at a time, until the page is full
    // but, every 5 increases we will reduce the field size by one byte
    field = REC_007;
    i = 0;
    String field_pre = null;
    while (true) {
      if ((i % 5) != 0) {
        field_pre = field;
        field += REC_008;
      } else {
        field = field_pre;
      }

      if (((i % 10) == 3) || ((i % 10) == 7)) {
        page.unlatch();
        page = null;

        factory.idle();

        page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);
      }

      col = new SQLChar(field);

      try {
        page.updateFieldAtSlot(0, 5, col, null);
      } catch (StandardException se) {
        // now we have filled the page
        if (i < 809) {
          throw T_Fail.testFailMsg("should be able to update Row 0 Column 5 809 times"
            + ", but only updated " + i
            + " times.  Note: you maybe getting this error if your page format has changed.");
        } else {
          REPORT("Row 0 Column 5 was updated " + i + " times.");
        }
        break;
      }
      i++;
    }
   
    // The page is completely full at this point.
    // update Row 1 Column 1 from REC_001 to REC_002.  They are the same length
    page.unlatch();
    page = null;
    factory.idle();
    page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);
    col = new SQLChar(REC_002);
    if (page.updateFieldAtSlot(1, 1, col, null) == null) {
      throw T_Fail.testFailMsg("update Row 1 and Column 1 to same length data failed.");
    }

    REPORT("updated col1 in row 1 to same length");

    // now expand update Row 1 Column 1 by one byte.  This should fail.
    page.unlatch();
    page = null;
    factory.idle();
    page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);
    field = REC_002 + REC_008;
    col = new SQLChar(field);
    try {
      page.updateFieldAtSlot(1, 1, col, null);
      throw T_Fail.testFailMsg("update Row 1 and Column 1 to longer length should have failed.");
    } catch (StandardException se) {
      ;
View Full Code Here

    if (rh0 == null)
      throw T_Fail.testFailMsg("insert of first long row failed.");
    else {
      REPORT("about to check fetch...");
      DataValueDescriptor column = new SQLChar();
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 0, column, false, REC_001, 256);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 1, column, false, REC_002, 256);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 2, column, false, REC_003, 256);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 3, column, false, REC_004, 256);
    }
View Full Code Here

    if (rh0 == null)
      throw T_Fail.testFailMsg("insert of a 60-column (300 bytes per column) row failed.");
    else {
      REPORT("about to check fetch the first long row inserted...");
      DataValueDescriptor column = new SQLChar();
      for (int i = 0; i < 60; i++) {
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, i, column, false, REC_001, 1200);
      }
    }

    // create a new row with 60 columns, and each column has REC_001 = "McLaren"
    for (int i = 0; i < 60; i++) {
      r0.setColumn(i, REC_001);
    }

    RecordHandle rh1 = null;
    try {
      rh1 = t_util.t_insertAtSlot(page, 1, r0, (byte) insertFlag);
    } catch (StandardException se) {
      throw T_Fail.testFailMsg("insert of second long row failed.");
    }

    if (rh1 == null) {
      throw T_Fail.testFailMsg("insert of a 60-column (~10 bytes per column) row failed.");
    } else {
      REPORT("about to check fetch the second long row inserted ...");
      DataValueDescriptor column = new SQLChar();
      for (int i = 0; i < 60; i++) {
        t_util.t_checkFetchColFromSlot(page, 1, i, column, false, REC_001);
      }
    }
View Full Code Here

      if (rh0 == null)
        throw T_Fail.testFailMsg("insert of first long row failed.");
      else {
        REPORT("about to check fetch...");
        DataValueDescriptor column = new SQLChar();
        for (int i = 0; i < 100; i++) {
          t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, i, column, false, REC_007);
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.SQLChar

Copyright © 2018 www.massapicom. 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.