> This method use Sub_statement_state for backup all required variables.
> I just extend it by me variables (as this was in first version of patch).
>
> Of course, I can extract structure to separated
> Sub_statement_state_slow_extended, but this is overenginnering, no?
I have looked more carefully, and I see that some of the already-existing Sub_statement_state fields are used for backup too. Now I agree that just extending it is OK.
> > 3) I'm not sure what "2)" and "3)" in the comment are trying to say.
>
> 2) and 3) about variable "write_to_slow_log":
> 2) write_to_slow_log never changed (changed just on thread start time)
> 3) write_to_slow_log should be used in implementation of feature "sampling
> by query"
2) The variable is initialized on the thread startup and remains constant afterwards. This will change when LP #712396 ("log_slow_slave_statements not work on replication threads without RESTART") is implemented.
3) An implementation of LP #688646 ("Make query sampling possible by query") should use it.
> This method use Sub_statement_state for backup all required variables. state_slow_ extended, but this is overenginnering, no?
> I just extend it by me variables (as this was in first version of patch).
>
> Of course, I can extract structure to separated
> Sub_statement_
I have looked more carefully, and I see that some of the already-existing Sub_statement_state fields are used for backup too. Now I agree that just extending it is OK.
> > 3) I'm not sure what "2)" and "3)" in the comment are trying to say. to_slow_ log":
>
> 2) and 3) about variable "write_
> 2) write_to_slow_log never changed (changed just on thread start time)
> 3) write_to_slow_log should be used in implementation of feature "sampling
> by query"
2) The variable is initialized on the thread startup and remains constant afterwards. This will change when LP #712396 ("log_slow_ slave_statement s not work on replication threads without RESTART") is implemented.
3) An implementation of LP #688646 ("Make query sampling possible by query") should use it.