Skip to content
  • Steinar H. Gunderson's avatar
    afd78201
    WL #13000: Iterator UNION [patch 16/16; rework PFS batch mode] · afd78201
    Steinar H. Gunderson authored
    Rework the way we turn on and off performance schema batch mode in iterators.
    The signal to turn on and off is now exclusively sent through iterators,
    instead of looking into QEP_TABs and cleaning up directly on handlers.
    
    In particular, this means that we send the “end PFS batch mode” signal to
    every single iterator in the tree at the end, guaranteeing that no involved
    table is left behind. This is a bit more brute-forcish than trying to turn
    it off on only the ones where we've turned it on, but much, much simpler to
    get right.
    
    The method for starting batch mode is also changed; instead of trying to
    figure out from the outside whether NestedLoopIterator is involved or not,
    we call StartPSIBatchMode() on the root iterator, which will send the signal
    down to the table iterator if we have a single table; if not, it will be
    stopped and ignored at the first NestedLoopIterator. Again, this vastly
    simplifies the logic.
    
    Change-Id: I8ad0e11e0fc0db6a54174c1b841c103f57fab32d
    afd78201
    WL #13000: Iterator UNION [patch 16/16; rework PFS batch mode]
    Steinar H. Gunderson authored
    Rework the way we turn on and off performance schema batch mode in iterators.
    The signal to turn on and off is now exclusively sent through iterators,
    instead of looking into QEP_TABs and cleaning up directly on handlers.
    
    In particular, this means that we send the “end PFS batch mode” signal to
    every single iterator in the tree at the end, guaranteeing that no involved
    table is left behind. This is a bit more brute-forcish than trying to turn
    it off on only the ones where we've turned it on, but much, much simpler to
    get right.
    
    The method for starting batch mode is also changed; instead of trying to
    figure out from the outside whether NestedLoopIterator is involved or not,
    we call StartPSIBatchMode() on the root iterator, which will send the signal
    down to the table iterator if we have a single table; if not, it will be
    stopped and ignored at the first NestedLoopIterator. Again, this vastly
    simplifies the logic.
    
    Change-Id: I8ad0e11e0fc0db6a54174c1b841c103f57fab32d
Loading