tx_isolation is a strange name, I agree with GeoffMontee, better to create @@transaction_isolation sysvar, like MySQL did.
We can mark tx_isolation deprecated and remove it eventually.
Sergei Golubchik
added a comment - tx_isolation is a strange name, I agree with GeoffMontee , better to create @@transaction_isolation sysvar, like MySQL did.
We can mark tx_isolation deprecated and remove it eventually.
Diego Dupin
added a comment - - edited btw, mysql java driver set transaction_isolation when creating connection, making java connector incompatible with MariaDB:
see https://github.com/mysql/mysql-connector-j/blob/release/8.0/src/main/user-impl/java/com/mysql/cj/jdbc/ConnectionImpl.java#L1211
resulting in error like this one :
java.sql.SQLException: Unknown system variable 'transaction_isolation'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java: 129 )
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java: 122 )
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java: 829 )
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java: 449 )
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java: 242 )
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java: 198 )
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java: 677 )
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java: 251 )
at test.Test.main(Test.java: 15 )
mysql ODBC use it as well, but only to retrieve isolation level: https://github.com/mysql/mysql-connector-odbc/blob/7f85d3d3e59c30c754570b1a1b47df4b5737e6e2/test/my_tran.c
To implement this feature, I mostly backport the code from MySQL 5.7 branch, noted here. It adds 2 new system variables (transaction_isolation and transaction_read_only) which references the same field as the original variables (tx_isolation and tx_read_only). The original variables are marked as deprecated, and users will get a warning when setting the original variables.
To avoid "surprises" to mariadb developers, I kept the internal representation of these variables. In other words, the change is only visible from a user's perspective. I also updated all the variables referenced in the tests for consistency.
@serg @nikitamalyavin What do you think about this approach and the PR? Thanks in advance.
Junqi Xie
added a comment - Hi all! This is my first attempt to create a patch to MariaDB community. https://github.com/MariaDB/server/pull/2491
To implement this feature, I mostly backport the code from MySQL 5.7 branch, noted here . It adds 2 new system variables ( transaction_isolation and transaction_read_only ) which references the same field as the original variables ( tx_isolation and tx_read_only ). The original variables are marked as deprecated, and users will get a warning when setting the original variables.
To avoid "surprises" to mariadb developers, I kept the internal representation of these variables. In other words, the change is only visible from a user's perspective. I also updated all the variables referenced in the tests for consistency.
@serg @nikitamalyavin What do you think about this approach and the PR? Thanks in advance.
Thanks junqi_xie for documenting the changes. Note that I reverted and will rework the SET TRANSACTION changes at https://mariadb.com/kb/en/set-transaction/+revision/125221/125173/, as the Knowledge Base is for all maintained versions, currently 10.3+, and the new instructions you specified will not work on releases prior to 11.1
Ian Gilfillan
added a comment - Thanks junqi_xie for documenting the changes. Note that I reverted and will rework the SET TRANSACTION changes at https://mariadb.com/kb/en/set-transaction/+revision/125221/125173/ , as the Knowledge Base is for all maintained versions, currently 10.3+, and the new instructions you specified will not work on releases prior to 11.1
People
Daniel Black
Geoff Montee (Inactive)
Votes:
3Vote for this issue
Watchers:
11Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":748.5,"ttfb":178.5,"pageVisibility":"visible","entityId":84041,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"5603041a-1e79-4968-b06f-f2eb4e3a71cd","navigationType":0,"readyForUser":853.3999998569489,"redirectCount":0,"resourceLoadedEnd":491.2999999523163,"resourceLoadedStart":183.89999985694885,"resourceTiming":[{"duration":9.400000095367432,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":183.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":193.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":10.299999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":184.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":194.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":169.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":184.19999980926514,"connectEnd":196.09999990463257,"connectStart":196.09999990463257,"domainLookupEnd":196.09999990463257,"domainLookupStart":196.09999990463257,"fetchStart":184.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":196.29999995231628,"responseEnd":353.2999999523163,"responseStart":208.29999995231628,"secureConnectionStart":196.09999990463257},{"duration":307,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":184.29999995231628,"connectEnd":184.29999995231628,"connectStart":184.29999995231628,"domainLookupEnd":184.29999995231628,"domainLookupStart":184.29999995231628,"fetchStart":184.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":196.79999995231628,"responseEnd":491.2999999523163,"responseStart":212,"secureConnectionStart":184.29999995231628},{"duration":39.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":184.5,"connectEnd":184.5,"connectStart":184.5,"domainLookupEnd":184.5,"domainLookupStart":184.5,"fetchStart":184.5,"redirectEnd":0,"redirectStart":0,"requestStart":201.19999980926514,"responseEnd":224.39999985694885,"responseStart":220.29999995231628,"secureConnectionStart":184.5},{"duration":43.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":184.59999990463257,"connectEnd":184.59999990463257,"connectStart":184.59999990463257,"domainLookupEnd":184.59999990463257,"domainLookupStart":184.59999990463257,"fetchStart":184.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":201.59999990463257,"responseEnd":228.5,"responseStart":221.29999995231628,"secureConnectionStart":184.59999990463257},{"duration":45.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":184.59999990463257,"connectEnd":184.59999990463257,"connectStart":184.59999990463257,"domainLookupEnd":184.59999990463257,"domainLookupStart":184.59999990463257,"fetchStart":184.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":202.09999990463257,"responseEnd":230.5,"responseStart":225.89999985694885,"secureConnectionStart":184.59999990463257},{"duration":15.600000143051147,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":184.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":200.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":44.200000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":184.79999995231628,"connectEnd":184.79999995231628,"connectStart":184.79999995231628,"domainLookupEnd":184.79999995231628,"domainLookupStart":184.79999995231628,"fetchStart":184.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":202.09999990463257,"responseEnd":229,"responseStart":225,"secureConnectionStart":184.79999995231628},{"duration":16.100000143051147,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":184.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":201,"responseStart":0,"secureConnectionStart":0},{"duration":46.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":185,"connectEnd":185,"connectStart":185,"domainLookupEnd":185,"domainLookupStart":185,"fetchStart":185,"redirectEnd":0,"redirectStart":0,"requestStart":202.89999985694885,"responseEnd":231.89999985694885,"responseStart":229.19999980926514,"secureConnectionStart":185},{"duration":273.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":193.29999995231628,"connectEnd":193.29999995231628,"connectStart":193.29999995231628,"domainLookupEnd":193.29999995231628,"domainLookupStart":193.29999995231628,"fetchStart":193.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":258.5,"responseEnd":466.7999999523163,"responseStart":457.7999999523163,"secureConnectionStart":193.29999995231628},{"duration":271.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":195.59999990463257,"connectEnd":195.59999990463257,"connectStart":195.59999990463257,"domainLookupEnd":195.59999990463257,"domainLookupStart":195.59999990463257,"fetchStart":195.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":272.7999999523163,"responseEnd":467.09999990463257,"responseStart":458.59999990463257,"secureConnectionStart":195.59999990463257},{"duration":59.700000047683716,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":492.69999980926514,"connectEnd":492.69999980926514,"connectStart":492.69999980926514,"domainLookupEnd":492.69999980926514,"domainLookupStart":492.69999980926514,"fetchStart":492.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":522,"responseEnd":552.3999998569489,"responseStart":551.5,"secureConnectionStart":492.69999980926514},{"duration":213.39999985694885,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":705.2999999523163,"connectEnd":705.2999999523163,"connectStart":705.2999999523163,"domainLookupEnd":705.2999999523163,"domainLookupStart":705.2999999523163,"fetchStart":705.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":889.2999999523163,"responseEnd":918.6999998092651,"responseStart":918.1999998092651,"secureConnectionStart":705.2999999523163},{"duration":161.80000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":742.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":742.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":904,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":29,"responseStart":178,"responseEnd":195,"domLoading":182,"domInteractive":918,"domContentLoadedEventStart":918,"domContentLoadedEventEnd":974,"domComplete":1385,"loadEventStart":1385,"loadEventEnd":1386,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":888.5999999046326},{"name":"bigPipe.sidebar-id.end","time":889.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":889.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":891.6999998092651},{"name":"activityTabFullyLoaded","time":993.3999998569489}],"measures":[],"correlationId":"b3fee0cb501591","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":90,"dbReadsTimeInMs":20,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
tx_isolation is a strange name, I agree with GeoffMontee, better to create @@transaction_isolation sysvar, like MySQL did.
We can mark tx_isolation deprecated and remove it eventually.