1 21 22 package org.apache.derby.impl.store.access.btree; 23 24 import java.io.IOException ; 25 import java.util.Properties ; 26 27 import org.apache.derby.iapi.reference.SQLState; 28 29 import org.apache.derby.iapi.services.sanity.SanityManager; 30 31 import org.apache.derby.iapi.services.io.Storable; 32 33 import org.apache.derby.iapi.error.StandardException; 34 import org.apache.derby.iapi.store.access.conglomerate.Conglomerate; 35 import org.apache.derby.iapi.store.access.conglomerate.LogicalUndo; 36 import org.apache.derby.iapi.store.access.conglomerate.TransactionManager; 37 import org.apache.derby.iapi.store.access.AccessFactoryGlobals; 38 import org.apache.derby.iapi.store.access.ConglomerateController; 39 import org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo; 40 import org.apache.derby.iapi.store.access.RowLocationRetRowSource; 41 import org.apache.derby.iapi.store.access.RowUtil; 42 import org.apache.derby.iapi.store.access.ScanController; 43 import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo; 44 import org.apache.derby.iapi.store.access.TransactionController; 45 46 import org.apache.derby.iapi.store.raw.ContainerHandle; 47 import org.apache.derby.iapi.store.raw.FetchDescriptor; 48 import org.apache.derby.iapi.store.raw.LockingPolicy; 49 import org.apache.derby.iapi.store.raw.Page; 50 import org.apache.derby.iapi.store.raw.RecordHandle; 51 import org.apache.derby.iapi.store.raw.Transaction; 52 53 import org.apache.derby.iapi.types.DataValueDescriptor; 54 55 import org.apache.derby.iapi.types.RowLocation; 56 57 import org.apache.derby.iapi.services.io.FormatableBitSet; 58 import org.apache.derby.impl.store.access.conglomerate.ConglomerateUtil; 59 import org.apache.derby.impl.store.access.conglomerate.TemplateRow; 60 61 62 63 74 75 public class BTreeController extends OpenBTree implements ConglomerateController 76 { 77 78 transient DataValueDescriptor[] scratch_template = null; 79 80 84 boolean get_insert_row_lock; 85 86 87 88 public BTreeController() 89 { 90 } 91 92 95 96 121 private boolean reclaim_deleted_rows( 122 OpenBTree open_btree, 123 long pageno) 124 throws StandardException 125 { 126 boolean purged_at_least_one_row = false; 127 ControlRow controlRow = null; 128 129 try 130 { 131 132 if ((controlRow = ControlRow.Get(open_btree, pageno)) == null) 133 return(false); 134 135 LeafControlRow leaf = (LeafControlRow) controlRow; 136 137 BTreeLockingPolicy btree_locking_policy = 138 open_btree.getLockingPolicy(); 139 140 141 int num_possible_commit_delete = 144 leaf.page.recordCount() - 1 - leaf.page.nonDeletedRecordCount(); 145 146 if ((num_possible_commit_delete > 0) && 147 (btree_locking_policy.lockScanForReclaimSpace(leaf))) 148 { 149 154 Page page = leaf.page; 155 156 157 FetchDescriptor lock_fetch_desc = 159 RowUtil.getFetchDescriptorConstant( 160 scratch_template.length - 1); 161 162 for (int slot_no = page.recordCount() - 1; 166 slot_no > 0; 167 slot_no--) 168 { 169 if (page.isDeletedAtSlot(slot_no)) 170 { 171 if (btree_locking_policy.lockScanCommittedDeletedRow( 175 open_btree, leaf, scratch_template, 176 lock_fetch_desc, slot_no)) 177 { 178 page.purgeAtSlot(slot_no, 1, true); 180 181 purged_at_least_one_row = true; 182 } 183 } 184 } 185 186 } 187 } 188 catch (java.lang.ClassCastException cce) 189 { 190 } 195 finally 196 { 197 if (controlRow != null) 198 controlRow.release(); 199 200 return(purged_at_least_one_row); 201 } 202 } 203 204 223 private long 224 start_xact_and_dosplit( 225 boolean attempt_to_reclaim_deleted_rows, 226 long leaf_pageno, 227 DataValueDescriptor[] scratch_template, 228 DataValueDescriptor[] rowToInsert, 229 int flag) 230 throws StandardException 231 { 232 TransactionManager split_xact = null; 233 OpenBTree split_open_btree = null; 234 ControlRow root = null; 235 236 split_xact = this.init_open_user_scans.getInternalTransaction(); 238 239 242 if (SanityManager.DEBUG) 243 { 244 if (((getOpenMode() & ContainerHandle.MODE_FORUPDATE) != 245 ContainerHandle.MODE_FORUPDATE)) 246 { 247 SanityManager.THROWASSERT( 248 "Container not opened with update should not cause split"); 249 } 250 } 251 252 253 boolean do_split = true; 254 if (attempt_to_reclaim_deleted_rows) 255 { 256 258 ConglomerateController base_cc = null; 259 260 try 261 { 262 base_cc = 263 this.getConglomerate().lockTable( 264 split_xact, 265 (ContainerHandle.MODE_FORUPDATE | 266 ContainerHandle.MODE_LOCK_NOWAIT), 267 TransactionController.MODE_RECORD, 268 TransactionController.ISOLATION_REPEATABLE_READ); 269 } 270 catch (StandardException se) 271 { 272 } 276 277 if (base_cc != null) 278 { 279 281 282 split_open_btree = new OpenBTree(); 288 split_open_btree.init( 289 this.init_open_user_scans, 290 split_xact, 291 null, split_xact.getRawStoreXact(), 293 false, 294 (ContainerHandle.MODE_FORUPDATE | 295 ContainerHandle.MODE_LOCK_NOWAIT), 296 TransactionManager.MODE_RECORD, 297 this.getConglomerate().getBtreeLockingPolicy( 298 split_xact.getRawStoreXact(), 299 TransactionController.MODE_RECORD, 300 LockingPolicy.MODE_RECORD, 301 TransactionController.ISOLATION_REPEATABLE_READ, 302 (ConglomerateController) base_cc, 303 split_open_btree), 304 this.getConglomerate(), 305 (LogicalUndo) null, 306 (DynamicCompiledOpenConglomInfo) null); 307 308 do_split = !reclaim_deleted_rows(split_open_btree, leaf_pageno); 310 311 split_open_btree.close(); 312 } 313 } 314 315 long new_leaf_pageno = leaf_pageno; 316 if (do_split) 317 { 318 split_open_btree = new OpenBTree(); 319 split_open_btree.init( 320 this.init_open_user_scans, 321 split_xact, 322 null, split_xact.getRawStoreXact(), 324 false, 325 getOpenMode(), TransactionManager.MODE_NONE, 328 this.getConglomerate().getBtreeLockingPolicy( 329 split_xact.getRawStoreXact(), 330 this.init_lock_level, 331 LockingPolicy.MODE_RECORD, 332 TransactionController.ISOLATION_REPEATABLE_READ, 333 (ConglomerateController) null, split_open_btree), 335 this.getConglomerate(), 336 (LogicalUndo) null, 337 (DynamicCompiledOpenConglomInfo) null); 338 339 340 root = ControlRow.Get(split_open_btree, BTree.ROOTPAGEID); 343 344 if (SanityManager.DEBUG) 345 SanityManager.ASSERT(root.page.isLatched()); 346 347 new_leaf_pageno = 348 root.splitFor( 349 split_open_btree, scratch_template, 350 null, rowToInsert, flag); 351 352 split_open_btree.close(); 353 } 354 355 split_xact.commit(); 356 357 split_xact.destroy(); 358 359 return(new_leaf_pageno); 360 } 361 362 377 private int doIns(DataValueDescriptor[] rowToInsert) 378 throws StandardException 379 { 380 LeafControlRow targetleaf = null; 381 LeafControlRow save_targetleaf = null; 382 int insert_slot = 0; 383 int result_slot = 0; 384 int ret_val = 0; 385 boolean reclaim_deleted_rows_attempted = false; 386 387 if (scratch_template == null) 388 scratch_template = runtime_mem.get_template(); 389 390 if (SanityManager.DEBUG) 391 this.isIndexableRowConsistent(rowToInsert); 392 393 SearchParameters sp = 396 new SearchParameters( 397 rowToInsert, 398 SearchParameters.POSITION_LEFT_OF_PARTIAL_KEY_MATCH, 399 scratch_template, this, false); 400 401 FetchDescriptor lock_fetch_desc = 403 RowUtil.getFetchDescriptorConstant( 404 scratch_template.length - 1); 405 RowLocation lock_row_loc = 406 (RowLocation) scratch_template[scratch_template.length - 1]; 407 408 410 if (get_insert_row_lock) 411 { 412 418 this.getLockingPolicy().lockNonScanRow( 419 this.getConglomerate(), 420 (LeafControlRow) null, 421 (LeafControlRow) null, 422 rowToInsert, 423 (ConglomerateController.LOCK_INS | 424 ConglomerateController.LOCK_UPD)); 425 } 426 427 while (true) 428 { 429 if (SanityManager.DEBUG) 431 SanityManager.ASSERT(this.container != null); 432 433 targetleaf = (LeafControlRow) 434 ControlRow.Get(this, BTree.ROOTPAGEID).search(sp); 435 436 437 int slot_after_previous = 446 (sp.resultExact ? sp.resultSlot : sp.resultSlot + 1); 447 448 boolean latch_released = false; 449 450 latch_released = 451 !this.getLockingPolicy().lockNonScanPreviousRow( 452 this.getConglomerate(), 453 targetleaf, 454 slot_after_previous, 455 lock_fetch_desc, 456 scratch_template, 457 lock_row_loc, 458 this, 459 (ConglomerateController.LOCK_INS_PREVKEY | 460 ConglomerateController.LOCK_UPD), 461 TransactionManager.LOCK_INSTANT_DURATION); 462 463 if (SanityManager.DEBUG) 465 { 466 latch_released = 467 test_errors( 468 this, 469 "BTreeController_doIns", false, 470 this.getLockingPolicy(), 471 targetleaf, latch_released); 472 } 473 474 if (latch_released) 475 { 476 targetleaf = null; 479 continue; 480 } 481 482 if (sp.resultExact) 494 { 495 result_slot = insert_slot = sp.resultSlot; 496 497 if (this.getConglomerate().nKeyFields != 498 this.getConglomerate().nUniqueColumns) 499 { 500 505 latch_released = 506 !this.getLockingPolicy().lockNonScanRowOnPage( 507 this.getConglomerate(), targetleaf, insert_slot, 508 lock_fetch_desc, scratch_template, lock_row_loc, 509 ConglomerateController.LOCK_UPD); 510 511 if (latch_released) 512 { 513 targetleaf = null; 517 continue; 518 } 519 } 520 521 523 if (!(targetleaf.page.isDeletedAtSlot(insert_slot))) 524 { 525 ret_val = ConglomerateController.ROWISDUPLICATE; 527 break; 528 } 529 else 530 { 531 if (this.getConglomerate().nKeyFields == 532 this.getConglomerate().nUniqueColumns) 533 { 534 targetleaf.page.deleteAtSlot( 536 insert_slot, false, this.btree_undo); 537 538 break; 539 } 540 else if (this.getConglomerate().nUniqueColumns == 541 (this.getConglomerate().nKeyFields - 1)) 542 { 543 549 targetleaf.page.deleteAtSlot( 556 insert_slot, false, this.btree_undo); 557 558 boolean update_succeeded = true; 559 560 try 561 { 562 int rowloc_index = 563 this.getConglomerate().nKeyFields - 1; 564 targetleaf.page.updateFieldAtSlot( 565 insert_slot, rowloc_index, 566 (DataValueDescriptor) RowUtil.getColumn( 567 rowToInsert, 568 (FormatableBitSet) null, rowloc_index), 569 this.btree_undo); 570 } 571 catch (StandardException se) 572 { 573 if (!se.getMessageId().equals(SQLState.DATA_NO_SPACE_FOR_RECORD)) 575 { 576 throw se; 577 } 578 579 update_succeeded = false; targetleaf.page.deleteAtSlot( 587 insert_slot, true, this.btree_undo); 588 } 589 590 if (update_succeeded) 591 break; 592 } 593 else 594 { 595 throw( 597 StandardException.newException( 598 SQLState.BTREE_UNIMPLEMENTED_FEATURE)); 599 } 600 } 601 } 602 else if (targetleaf.page.recordCount() - 1 < 603 this.getConglomerate().maxRowsPerPage) 604 { 605 insert_slot = sp.resultSlot + 1; 608 result_slot = insert_slot + 1; 609 610 614 if (targetleaf.page.insertAtSlot( 615 insert_slot, 616 rowToInsert, (FormatableBitSet) null, 617 this.btree_undo, 618 Page.INSERT_DEFAULT, 619 AccessFactoryGlobals.BTREE_OVERFLOW_THRESHOLD) != null) 620 { 621 623 break; 624 } 625 626 631 if (targetleaf.page.recordCount() <= 2) 632 { 633 throw StandardException.newException( 634 SQLState.BTREE_NO_SPACE_FOR_KEY); 635 } 636 637 } 639 640 641 643 int flag = 0; 645 if (insert_slot == 1) 646 { 647 flag |= ControlRow.SPLIT_FLAG_FIRST_ON_PAGE; 648 if (targetleaf.isLeftmostLeaf()) 649 flag |= ControlRow.SPLIT_FLAG_FIRST_IN_TABLE; 650 } 651 else if (insert_slot == targetleaf.page.recordCount()) 652 { 653 flag |= ControlRow.SPLIT_FLAG_LAST_ON_PAGE; 654 if (targetleaf.isRightmostLeaf()) 655 flag |= ControlRow.SPLIT_FLAG_LAST_IN_TABLE; 656 } 657 658 long targetleaf_pageno = targetleaf.page.getPageNumber(); 659 660 if ((targetleaf.page.recordCount() - 661 targetleaf.page.nonDeletedRecordCount()) <= 0) 662 { 663 reclaim_deleted_rows_attempted = true; 665 } 666 667 BranchRow branchrow = 668 BranchRow.createBranchRowFromOldLeafRow( 669 rowToInsert, targetleaf_pageno); 670 671 targetleaf.release(); 676 targetleaf = null; 677 678 start_xact_and_dosplit( 679 !reclaim_deleted_rows_attempted, targetleaf_pageno, 680 scratch_template, branchrow.getRow(), flag); 681 682 reclaim_deleted_rows_attempted = true; 686 687 } 693 694 targetleaf.last_search_result = result_slot; 696 697 if (SanityManager.DEBUG) 699 { 700 if (SanityManager.DEBUG_ON("enableBtreeConsistencyCheck")) 701 { 702 targetleaf.checkConsistency(this, null, true); 703 } 704 } 705 706 targetleaf.release(); 708 targetleaf = null; 709 710 return(ret_val); 712 } 713 714 719 private boolean do_load_insert( 720 DataValueDescriptor[] rowToInsert, 721 LeafControlRow leaf, 722 int insert_slot) 723 throws StandardException 724 { 725 LeafControlRow old_leaf = null; 726 boolean row_inserted = false; 727 int num_rows_on_page = leaf.page.recordCount() - 1; 728 729 730 if (SanityManager.DEBUG) 731 { 732 SanityManager.ASSERT(insert_slot == leaf.page.recordCount()); 733 SanityManager.ASSERT( 734 leaf.getrightSiblingPageNumber() == 735 ContainerHandle.INVALID_PAGE_NUMBER); 736 this.isIndexableRowConsistent(rowToInsert); 737 } 738 739 if (num_rows_on_page < this.getConglomerate().maxRowsPerPage) 740 { 741 745 if (SanityManager.DEBUG) 746 { 747 749 if (insert_slot > 1) 750 { 751 int compare_result = 753 ControlRow.CompareIndexRowFromPageToKey( 754 leaf, 755 insert_slot - 1, 756 scratch_template, 757 rowToInsert, 758 this.getConglomerate().nUniqueColumns, 759 0, 760 this.getConglomerate().ascDescInfo); 761 762 if (compare_result >= 0) 763 { 764 SanityManager.THROWASSERT("result = " + compare_result); 768 } 769 } 770 } 771 772 773 if (leaf.page.insertAtSlot( 774 insert_slot, 775 rowToInsert, 776 (FormatableBitSet) null, 777 this.btree_undo, 778 Page.INSERT_DEFAULT, 779 AccessFactoryGlobals.BTREE_OVERFLOW_THRESHOLD) != null) 780 { 781 row_inserted = true; 783 } 784 else 785 { 786 791 if (leaf.page.recordCount() <= 2) 792 { 793 throw StandardException.newException( 794 SQLState.BTREE_NO_SPACE_FOR_KEY); 795 } 796 } 797 } 798 799 if (SanityManager.DEBUG) 801 { 802 if (SanityManager.DEBUG_ON("enableBtreeConsistencyCheck")) 803 { 804 leaf.checkConsistency(this, null, true); 805 } 806 } 807 808 return(row_inserted); 809 } 810 811 819 private LeafControlRow do_load_split( 820 DataValueDescriptor[] rowToInsert, 821 LeafControlRow leaf) 822 throws StandardException 823 { 824 LeafControlRow new_leaf = null; 825 826 BranchRow branchrow = 827 BranchRow.createBranchRowFromOldLeafRow( 828 rowToInsert, leaf.page.getPageNumber()); 829 830 long old_leafpage = leaf.page.getPageNumber(); 835 836 leaf.release(); 837 leaf = null; 838 839 long new_leaf_pageno = 840 start_xact_and_dosplit( 841 false , 842 old_leafpage, 843 scratch_template, 844 branchrow.getRow(), 845 (ControlRow.SPLIT_FLAG_LAST_ON_PAGE | 846 ControlRow.SPLIT_FLAG_LAST_IN_TABLE)); 847 848 new_leaf = (LeafControlRow) ControlRow.Get(this, new_leaf_pageno); 849 850 if (SanityManager.DEBUG) 858 { 859 if (new_leaf.getrightSiblingPageNumber() != 860 ContainerHandle.INVALID_PAGE_NUMBER) 861 { 862 SanityManager.THROWASSERT( 863 "new_leaf.getrightSiblingPageNumber() = " + 864 new_leaf.getrightSiblingPageNumber()); 865 } 866 if (new_leaf.page.recordCount() <= 1) 867 { 868 SanityManager.THROWASSERT( 869 "new_leaf.page.recordCount() = " + 870 new_leaf.page.recordCount()); 871 } 872 } 873 874 return(new_leaf); 875 } 876 877 878 879 882 883 896 public void init( 897 TransactionManager xact_manager, 898 boolean hold, 899 ContainerHandle container, 900 Transaction rawtran, 901 int open_mode, 902 int lock_level, 903 BTreeLockingPolicy btree_locking_policy, 904 BTree conglomerate, 905 LogicalUndo undo, 906 StaticCompiledOpenConglomInfo static_info, 907 DynamicCompiledOpenConglomInfo dynamic_info) 908 throws StandardException 909 { 910 get_insert_row_lock = 911 ((open_mode & 912 TransactionController.OPENMODE_BASEROW_INSERT_LOCKED) == 0); 913 914 super.init( 915 xact_manager, xact_manager, 916 container, rawtran, hold, open_mode, 917 lock_level, btree_locking_policy, 918 conglomerate, undo, dynamic_info); 919 } 920 921 924 925 938 public void close() 939 throws StandardException 940 { 941 super.close(); 942 943 if (getXactMgr() != null) 946 getXactMgr().closeMe(this); 947 } 948 949 978 public boolean closeForEndTransaction(boolean closeHeldScan) 979 throws StandardException 980 { 981 super.close(); 982 983 if ((!getHold()) || closeHeldScan) 984 { 985 if (getXactMgr() != null) 988 getXactMgr().closeMe(this); 989 990 return(true); 991 } 992 else 993 { 994 return(false); 995 } 996 } 997 998 1014 public int insert(DataValueDescriptor[] row) 1015 throws StandardException 1016 { 1017 1018 if (isClosed()) 1019 { 1020 if (getHold()) 1021 { 1022 reopen(); 1023 } 1024 else 1025 { 1026 throw StandardException.newException( 1027 SQLState.BTREE_IS_CLOSED, 1028 new Long (err_containerid)); 1029 } 1030 } 1031 1032 if (SanityManager.DEBUG) 1033 { 1034 SanityManager.ASSERT(this.container != null); 1035 1036 TemplateRow.checkPartialColumnTypes( 1037 this.getConglomerate().format_ids, 1038 (FormatableBitSet) null, (int []) null, row); 1039 } 1040 1041 return doIns(row); 1042 } 1043 1044 1050 public boolean isKeyed() 1051 { 1052 return(true); 1053 } 1054 1055 1084 public void getTableProperties(Properties prop) 1085 throws StandardException 1086 { 1087 if (this.container == null) 1088 { 1089 throw StandardException.newException( 1090 SQLState.BTREE_IS_CLOSED, 1091 new Long (err_containerid)); 1092 } 1093 1094 container.getContainerProperties(prop); 1095 1096 return; 1097 } 1098 1099 1124 public Properties getInternalTablePropertySet(Properties prop) 1125 throws StandardException 1126 { 1127 Properties ret_properties = 1128 ConglomerateUtil.createRawStorePropertySet(prop); 1129 1130 getTableProperties(ret_properties); 1131 1132 return(ret_properties); 1133 } 1134 1135 1160 public long load( 1161 TransactionManager xact_manager, 1162 boolean createConglom, 1163 RowLocationRetRowSource rowSource) 1164 throws StandardException 1165 { 1166 long num_rows_loaded = 0; 1167 1168 if (SanityManager.DEBUG) 1169 { 1170 SanityManager.ASSERT(createConglom, 1171 "Cannot load a btree incrementally - it must either be entirely logged, or entirely not logged. Doesn't make sense to log only the allocation when one cannot guarantee to not touch any pre-existing pages"); 1172 } 1173 1174 if (scratch_template == null) 1175 scratch_template = runtime_mem.get_template(); 1176 1177 LeafControlRow current_leaf = null; 1178 1179 try 1180 { 1181 current_leaf = 1184 (LeafControlRow) ControlRow.Get(this, BTree.ROOTPAGEID); 1185 int current_insert_slot = 1; 1186 1187 if (SanityManager.DEBUG) 1188 { 1189 SanityManager.ASSERT(current_leaf.page.recordCount() == 1); 1191 } 1192 1193 FormatableBitSet validColumns = rowSource.getValidColumns(); 1195 1196 DataValueDescriptor[] row; 1198 while ((row = rowSource.getNextRowFromRowSource()) != null) 1199 { 1200 num_rows_loaded++; 1201 1202 if (SanityManager.DEBUG) 1203 { 1204 SanityManager.ASSERT( 1205 validColumns == null, "Does not support partial row"); 1206 } 1207 1208 while (true) 1209 { 1210 if (do_load_insert(row, current_leaf, current_insert_slot)) 1211 { 1212 break; 1214 } 1215 else 1216 { 1217 current_leaf = do_load_split(row, current_leaf); 1223 1224 current_insert_slot = current_leaf.page.recordCount(); 1225 } 1226 } 1227 current_insert_slot++; 1228 } 1229 1230 current_leaf.release(); 1231 current_leaf = null; 1232 1233 if (!this.getConglomerate().isTemporary()) 1235 container.flushContainer(); 1236 } 1237 finally 1238 { 1239 this.close(); 1240 } 1241 1242 return(num_rows_loaded); 1243 } 1244 1245 1248 1249 1255 public boolean delete(RowLocation loc) 1256 throws StandardException 1257 { 1258 throw(StandardException.newException( 1259 SQLState.BTREE_UNIMPLEMENTED_FEATURE)); 1260 } 1261 1262 1268 public boolean fetch( 1269 RowLocation loc, 1270 DataValueDescriptor[] row, 1271 FormatableBitSet validColumns) 1272 throws StandardException 1273 { 1274 throw(StandardException.newException( 1275 SQLState.BTREE_UNIMPLEMENTED_FEATURE)); 1276 } 1277 1278 1284 public boolean fetch( 1285 RowLocation loc, 1286 DataValueDescriptor[] row, 1287 FormatableBitSet validColumns, 1288 boolean waitForLock) 1289 throws StandardException 1290 { 1291 throw(StandardException.newException( 1292 SQLState.BTREE_UNIMPLEMENTED_FEATURE)); 1293 } 1294 1295 1305 public void insertAndFetchLocation( 1306 DataValueDescriptor[] row, 1307 RowLocation templateRowLocation) 1308 throws StandardException 1309 { 1310 throw StandardException.newException( 1311 SQLState.BTREE_UNIMPLEMENTED_FEATURE); 1312 } 1313 1314 1322 public RowLocation newRowLocationTemplate() 1323 throws StandardException 1324 { 1325 throw StandardException.newException( 1326 SQLState.BTREE_UNIMPLEMENTED_FEATURE); 1327 } 1328 1329 1347 public boolean lockRow( 1348 RowLocation loc, 1349 int lock_operation, 1350 boolean wait, 1351 int lock_duration) 1352 throws StandardException 1353 { 1354 throw StandardException.newException( 1355 SQLState.BTREE_UNIMPLEMENTED_FEATURE); 1356 } 1357 1358 public boolean lockRow( 1359 long page_num, 1360 int record_id, 1361 int lock_operation, 1362 boolean wait, 1363 int lock_duration) 1364 throws StandardException 1365 { 1366 throw StandardException.newException( 1367 SQLState.BTREE_UNIMPLEMENTED_FEATURE); 1368 } 1369 1370 public void unlockRowAfterRead( 1371 RowLocation loc, 1372 boolean forUpdate, 1373 boolean row_qualifies) 1374 throws StandardException 1375 { 1376 throw StandardException.newException( 1377 SQLState.BTREE_UNIMPLEMENTED_FEATURE); 1378 } 1379 1380 1386 public boolean replace( 1387 RowLocation loc, 1388 DataValueDescriptor[] row, 1389 FormatableBitSet validColumns) 1390 throws StandardException 1391 { 1392 throw StandardException.newException( 1393 SQLState.BTREE_UNIMPLEMENTED_FEATURE); 1394 } 1395} 1396 | Popular Tags |