[MXS-1603] Get trx status from ok packet through SESSION_TRACK_TRANSACTION_STATE mechanism Created: 2018-01-12  Updated: 2020-05-11  Resolved: 2018-06-12

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbbackend, mariadbclient, readwritesplit
Affects Version/s: 2.2
Fix Version/s: 2.3.0

Type: Task Priority: Major
Reporter: dapeng huang Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MXS-1549 Aggressive read write split Closed

 Description   

there are two problems with using qc to get current session transaction status:
1. if use rwsplist service, a query will be parsed twice, one in MysqlClient , another in rwsplit routing session;
2. it cannot get current trx status correctly if user encapsulated 'start transaction' in prepare statement or stored function;

so it is better to let db tell proxy what the real trx status is, we can use #WL6631 title



 Comments   
Comment by Johan Wikman [ 2018-01-12 ]

You are correct that the statement will be parsed twice, although the parsing that is done in MySqlClient is quite efficient and as such does not have much impact on the overall performance. It's also true that if a transaction is started in a prepared statement or a stored function the transaction state is not correctly tracked.

So indeed it would be much better to use the information provided by the server. I think it is safe to say we will start using that but at this point I cannot say anything specific about the timeframe.

Comment by dapeng huang [ 2018-01-13 ]

hi Johan Wikman , I created a pr https://github.com/mariadb-corporation/MaxScale/pull/158, could you review it;

Generated at Thu Feb 08 04:08:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.