Corrected Third Printing

Transaction Processing Concepts and Techniques by

Gray & Reuter

Thanks to Shinya Fushimi (U. Tokyo), Masaru Kitsuragawa (U. Tokyo), Don Knuth (U. Stanford), Tadashi Ohmori (U. Tokyo), Cristian Petculescu (Microsoft), Ole Stauning, and Sonar Ultas for these bugs.

Notation:  Page [+line count from top, - line count from bottom] errata.

Pink is 98Q2 delta

Red is 98Q4 delta.

Blue is 99Q1: delta

Green is 2000Q2 delta

Purple is 2001Q2

112- equation 3.7:  "))" -> ")"

112- equation 3.7: “P1 »” --> “P1 =”

112- equation 3.8: “Pn-1 » P1 n-1 =” -> “Pn-1 = P1 n-1 »

124-18: “log(mtvf*randf())” -> log(randf())*mtvf

124-17: “log(mtsf*randf())” -> log(randf())*mtsf

129-11: "=" -> "=="

129-10: "&valuep" -> "valuep"

137-4: "value" -> "ticketno"

168+6: “TCB” -> “TPC”

177+1: "fact"->  "fault"

182+14: "B4" -> "B3"

182+15: "5" -> "B5"

384-1:      drop this line, it is duplicated at top of 385.

388-11:    "<T,<o,V(o,j),T'>"  ->

"<T1,<o,V(o,i),T2>" (notice T1, T2, and j became i).

405+1:     ",," -> ",'

415-1:      drop this line, it is duplicated at top of 416.

416+9:   "{IS, IX, SIX, S, X}" ->

"{IS, IX, SIX, S, U,  X}"

416+11: "{IX, SIX}" ->

"{IX, SIX, U,  X}"

417+15:   "{IS, S, U}" ->

"{IS, S}

417+16:   "{IS, IX, SIX, S, X}" ->

"{ IS, IX, SIX, S, U, X}"

417+19:20 :             "{IX, SIX, X}" ->

"{IX, SIX, U, X}"   (three times).

417-15:-16:  indent "IMPLICTLOKSt(bi)" to line up with the hanging indent.

and close up the space before the equal sign.  It should read:

"IMPLICITLOCKST (b)    =  X if b is a root and LOCKST (b) = X, or b is not a root and

IMPLICITLOCKST(bi) = X for reach node bi in some node slice for b."

455+9:     “compare-and-swap.:” -> “compare-and-swap:”

p 465 –2: “Figure 7.4” -> “the figure in Table 8.4”

p 474 + :for(request=lock->chain; request.......’-> should be ‘for(request=lock->queue; request.......’

P.503 -5:  " resouce"==> "resource"

P.515 +13: "commited"   ==> "committed"

P.522 Exercise 5: "20-hour" ==>  "10-hour"

P.525 Answer 12   "2ms" ==> " 0.2ms"

P.567+5: " undo" ==> "UNDO"

P.569-11: "brances" ==> "branches"

P.573+14: "/* commit */ " ==>  "/* abort */"

586+21:                   "birthday," ->

"birthday;"

588+27: "The transaction manager keeps… each active transaction" ->

"The transaction manager keeps… each live transaction"

591-4:      "6.2.2" -> "6.3.2.1"

594-19:    "))" -> ")"

594-19:    "save_num = trans->save_pt++"  ->

"trans->save_pt = save_num = trans->next_save_pt++"

595+17:   "return the resulting save point num" ->

" return success"

600-8:      "next_save_pt++"  ->

"next_save_pt"

601+6"   "if (timeout || error) abort=TRUE;"

"if (timeout) abort=TRUE                   /* on RM timeout, abort transaction  */

else if (error) target_savepoint = 0;  /* on error go back to savepoint zero */

602-7-6: The text says that if an RM fails, Rollback stops at the first persistent savepoint at or prior to the target savepoint.   The code does not have this logic.  Adding it requires extra logic (not a simple typo) and is left as an exercise for the reader.

611-3:      "or this" -> "for this"

612-5:      "rmid = TMID"

"rmid ==TMID" (double equals sign).

626:Exercise 14: "12" ->"13"

627+3: "This is a standard problem called flooding" ->

"This problem has a standard solution called flooding." (italic flooding).

627+15: "UNDO=REDO" -> "UNDO-REDO"

645-11: "3MH+2W" -> "3MH +2NW"

645-10: "2M(N-1) or 3M(N-1) versus 4M(N-1)." ->

" 2(N-1) or 3(N-1) messages versus 4(N-1) messages."

654+2: "ACI" -> "ACD"

657+12: "a->b->e->g->." ->

"a->b->e->g->i."

657+14: "16M+8L" -> "16M + 9L"

657+16: "transaction T"-> "transaction T1"

p.673-5   "basic file"--> "basic file system"

p.674-12  "flip" --> "flip;"          (add semicolon)

p.676+18  "at then one" --> "at the one"

p.676+21  "writec(FILEID,BLOCKID,BLOCKP)"  ->  "writec(FILEID,BLOCKID,blockcount,BLOCKP)"

p.680+2   "(x - curr_alloc[i].accum_length[i-1] -1)"  -> “(x - curr_alloc[i-1].accum_length - 1)”

p.683-8   "with exactly v 1s" ->   "with at most v 1s"

p.694+8   "if"--> "If"

p.694+10  "BUFFER_ACC_CBP" --> "address"

p.695+7   "Page" --> "page"

p.696-16  "the" --> "The"

p.696-15  "the" --> "The"

p.697+3   "‘N’" --> "FALSE"

p.699+13  FILEID *infile;  --> FILEID infile;   // not a pointer.

p.700-15:  "free_frame_sem" --> "&free_frame_sem"

p.700-14:  "mru_page, lru_page = NULL;" --> "mru_page = lru_page = NULL;"

p.701+8:   "xsemaphore" --> "class_sem"

p.701+13  "does" --> "does not"

p.703+19  HANDLE find_filecb(PAGEID) - > FILEID find_filecb(PAGEID)

p.703-16  " BUFFER_ACC_CBP address" -> " BUFFER_ACC_CBP *address"

p.703-9:   "exclusive semaphore" --> "shared semaphore"

p.703-1:   "normal exclusive semaphore" --> ""

p.704+4   "next_cb = next_cb->.." --> "next_bcb = next_bcb->.."

p.704+8   next_bb” --> “next_bcb

p704+23:  The update "(next_bcb->fixcount)++;" is a shared variable and so should use an atomic increment (compare and swap or load-locked store conditional). See example on p. 452.

p.704+26  "address = get_acb()" --> "*address = get_acb()"

p.704+29  "netx_bcb" --> "next_bcb"

p.705+1:   "Lock_x" --> "Lock_X"     // Capitalize X

p.705+8:   "Lock_x" --> "Lock_X "    // Capitalize X

p.705-13:  "blockno." --> "blockno"  // Remove period

p.705-11:  "frame-no" --> "frame_no" // minus --> underscore

p.706-6   “next-bcb” --> “next_bcb” // minus --> underscore

p 707+1: "returns a pointer to" -> "returns the index of"

p.717-3:  forminlsn<SP>. --> forminlsn.

p.752+3  This not” -->  “This is not”

p. 753+22:  “note” à  “Note”

p.758+13        typo: full) the --> full), the

p.762 Fig14.5 change all ocurences of  "This Tuple" à  "this tuple"

p.765+6   "2*107 tuples" --> "5*106 tuples"

p.770+1   "mPF mEP" --> "mPF(mEP"

p.772-3:  "‘DATE," --> "‘DATE’,"

p.774+3   "TABLES" --> "accessible_tables"

p.774+8    "TABLES and COLUMNS" -> "accessible_tables and accessible_columns"

p.783-15    "length_or_offset" --> "field_length"

p.833+24:  “but can also be used for nonunique attributes” à “but hashing can also be used for nonunique attributes”

p.837 Fig15.2   C7 --> D7 (3 places. The EBCDIC code for ‘P’ of Pamela.)

p.837 Fig15.2   92 B7 59 23 --> 92 B6 59 26 (calculated kb value)

p.837 Fig15.2   6E --> 6B (The line of “Divide into sections of 4 bytes each”   11th code.)

840+16: "Kb" -> "kb"

p.840+22        15.2.4 --> 15.3.4

840-1: "Kb" -> "kb" (twice)

841+1: "Kb" -> "kb"

841-11: "Kb" -> "kb"

841-10: "Kb" -> "kb"

843+3:   "f" -> "F"

p.846+19:  strategyà  "strategy” (remove italics)

846-1: "k(r)"  -> "K"

851-14: "is is" -> "is"

854+4: "R"  --> "H"

p.860+24 "15.3.4" --> "15.4.4"

865 Figure 15.9: Drop arrows below and left of "Copelletti " in figures A and B.

865 Figure 15.9: "B*-tree" -> "B-tree"

866 footnote: " B*-tree" -> "B-tree"

869 Fig. 15.10 B*-tree" -> "B-tree"

870 Fig. 15.11 "B*-tree" -> "B-tree"

872+2: caption: "anomally" -> "anomaly"

872+14:"request long IX lock on c" -> "if c = c1, request long IX lock on c".

874+6: "Pi inserted by T2" -> "Pi inserted by T1"

874+10: "Pa’ inserted by T1" -> "Pa’ inserted by T2"

877+8: "one entry" -> "oneentry"  (remove a space between ‘one’ and ‘entry’)

878-3 “the insert position  should be in Times New Roman font.

p.879+27: "15.4.4.3" --> "15.4.3"

880+17: “R” --> ‘R’ (single quotes)

881+12: "of search key of search key"-> "of search key"

882+12: "translation" -> "transaction"

882-12 "newdata" --> "newdata;" (add semicolon)

883+9: "thatcase" -> "that case"    (need a space)

883+15+16: "requested if "-> "requested. If "  (need a period and cap)

883+23:  "highest key"-->   tab to align then" /* highest key…"

883-14 "tree,root"  ->  "tree.root"    (period, not comma)

p.884+2  "};" --> "}"        (remove the semicolon)

886+2 "heighbor" -> "neighbor"

888-15,-13: drop the lines: "Let bj denote the local…. D-#pj+1."   The sentences are wrong and not helpful.

889-5: "insert (or delete operation" -> "insert (or delete) operation"

893+1: "Figure 15.19" -> "Figure 15.18"

p.895+7 "c and c" --> "c and c"

896+4:  "k=o" -> "k=0"  // zero instead of oh

896-6: "T1" -> "t1"

899-5:  "a1" -> "A1"

902+24: "marked in node u" -> "marked in node r"

903 Fig. 15.24 B: "Index node node" -> "Index node"

903+5: "(which is collapsed) .... data." ->"(which is collapsed ... data)."

904+2: "15.25" --> "15.24"

904+3,4,5, 6: "b1" --> "B1" and "a3" -> "A3"

904 Figure 15.25 C: "Index node node" -> "Index node"

905+15: "fast" -> "vast"

906+7: "is is" -> "is"

p.908+4   "15.3.4" --> "15.4.4"

p.908+23  "15.5.1" --> "15.6.1"

908-2: "Stonebreaker" -> "Stonebraker"

909-18: "of  f tuples" --> "of  t  tuples"

p.909-3 "Figure 15.5" --> "Figure 15.4"

p.910+11(Q4):  “bucket-number(r,1)” à  “page-no(k1,1)”

p.910+12(Q4):  “bucket-number(r,2)” à  “page-no(k1,2)”

911+4:     "strikes -- which means the whole tree -- is locked" ->
"strikes, which means the whole tree is locked exclusively"

911+16: "Assume all have" ->"Assume all overflow pages have"

911+21: ".25" -> ."23"

911+23, +26: "1.25" -> "1.23"

911+27: "Bavg" --> "Bavg"     (avg should be a subscript not a superscript)

911+28:  "1.2094" -> "1.0375"

913+7, 9 rephrase "Hence all these ....,  with IX." As  "Hence, had they known about the index-leaf key-range locking protocol, all these other transactions could have acquired an intention mode lock compatible with IX on the index node."

913-4: "4,783" -> "5,136"

913-3: "47822 = 22,877,089" -> "51362 = 26,378,496"

913-2: "187GB" -> "201GB"

935-8:      "status = OK" ->

"status == OK" (double equals sign)

938+5: "psuedocode" -> "pseudocode"

P.963+8: "xa_open()"==> "xa_recover()"

p.703-16  " BUFFER_ACC_CBP address" -> " BUFFER_ACC_CBP *address"

p.1001+1:  " BUFFER_ACC_CBP address" -> " BUFFER_ACC_CBP *address"

p.1001+20   "‘N’" --> "FALSE"